I have an error with this line. I am working with a dictionary from a file with an import. This is the dictionary:
users = [{'id':1010,'name':"Administrator",'type':1},{'id':1011,'name':"Administrator2",'type':1}]
And the method with which the work is as follows:
def addData(dict, entry):
new = {}
x = 0
for i in dict.keys():
new[i] = entry(x)
x += 1
dict.append(new)
Where "dict" would be "users", but the error is that the dictionary does not recognize me as such. Can anyone tell me, I have wrong in the dictionary?
usersvariable is actually a list of dictionaries.