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
Back To Top
Search