0

I'm able to store a single list into a json file to be used later. How would you store multiple lists into a json file. Let's say that I wanted to add the username to the file and the username + '@gmail.com" as another list into the same file. How would you access these two lists from the json file later?

import json
username = johnsmith91
storelist = []
storelist.append(username)
with open('username.json', 'a') as outfile:
    json.dump(storelist, outfile)

0 Answers0