I am referring this question
This is my code
my_dictionary={}
a=[]
for i in range(1,5)
jsonstring = {id[i] : marks[i]}
a.append(jsonstring)
my_dictionary=json.dumps(a)
print(my_dictionary)
This is the output
[{"123": [86, 0, 0, 96, 45.5]}]
I want the string such as
{"123": [86, 0, 0, 96, 45.5],"124": [89, 0, 90, 96, 87],....}
jsonstring(which is not a string but a dictionary) to your list.studentInfoto be a list. Did you mean for it to be one big dictionary instead?