I'm trying to get from a text file the dictionaries stored in a list
I searched for a json
function, which can separate the string and save it in a list (a list of dictionaries), but I do not know if there is something like this.
txt:
[{"Principal": ["Jhon","Anderson","40"]}, {"Secretary": ["Marie","Garcia","29"]},{"Councilor": ["Alan", "Smith","33"]}]
py code:
stringvar=textfile.read()
// for or function below
dictionaries=json.loads(textfile.read())
otherlist=dictionaries