These codes seem the same on paper but their outcomes show they are different codes under the hood. Is it because of scope within the loop? The output shows on the first example any alteration of the first dictionary changes the second dictionary as well. The second example allows for individual dictionary contents alteration without changing the other dictionary which is also of the same name at creation.
new_person = {'haircolor':'blonde'}
new_person = {'haircolor':'blonde'}
people = [new_person,new_person]
people[0]['haircolor'] = 'brunette'
print(people)
#######################################
people = []
for num in range(2):
new_person = {'haircolor':'blonde'}
people.append(new_person)
people[0]['haircolor'] = 'brunette'
print(people)