I'm sure this is something simple I'm missing, but with the code I have there is a list of dictionaries. I iterate over the list and update the dictionary items one by one. However, in the end I'm left with a list of all the exact same dictionary. I recreated the issue with barebones script and it still happens, so I'm thinking it's something to do with how I'm referring to the items.
import random
MyDict = {
'Name': '',
'Address': '',
'SSN': ''
}
Rows = []
Rows = [MyDict] * 5
print('We iterate through each item, and change the SSN value to a random number, printing as we go')
for i in range(len(Rows)):
Rows[i]['SSN']= random.randint(0,999)
print(Rows[i])
print('Printing at the end, and they are now all the same.')
for i in Rows:
print(i)