skip to Main Content

Json Error while reading a nested list from a file

Following this post, I used the following code: with open(mytextFile) as f: nestedList = json.load(f) print(nestedList) my textfile consists of [[i,1],[i,2]] only. When I run the above code, I get the error: raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError:…

VIEW QUESTION

Opening an xlsx file – Ubuntu

I've extracted an excel file by running the code below. from zipfile import ZipFile with ZipFile('HISTDATA_COM_XLSX_EURUSD_M12018.zip', 'r') as zipObj: zipObj.extractall() After that, I wanted to open it. Due to being an xlsx file, I imported the openpyxl module and ran…

VIEW QUESTION
Back To Top
Search