What is the best way to fix the following code
my_list=[]
elem={}
for i in range(4):
elem['id']=i
my_list.append(elem)
print my_list
result
[{'id': 3}, {'id': 3}, {'id': 3}, {'id': 3}]
expected result
[{'id': 0}, {'id': 1}, {'id': 2}, {'id': 3}]
**I don't want to use another variable