I have this list of dictionary:
MylistOfdict = [{\'Word\': \'surveillance\',
\'Word No\': 1},
{\'Word\': \'equivocal\',
\'Word No\': 2}]
Use deepcopy. What's happening is that your append call is just appending a reference to the original object.
from copy import deepcopy
my_list_of_dict = [{'Word': 'surveillance',
'Word No': 1},
{'Word': 'equivocal',
'Word No': 2}]
word_db2 = []
key = 1
for i in my_list_of_dict:
for j in range(1, 4):
i['Card Type'] = 'Type ' + str(j)
i['Card Key'] = key
print(i)
word_db2.append(deepcopy(i))
key += 1
for i in word_db2:
print(i)