You are accidentally changing the entire dictionary instead of the specific alien you want the dictionary to represent.
For now, just add .copy()
to each time you append an alien dictionary to your random list of aliens.
if color[random_num] == 'green':
aliens_1.append(alien_0.copy())
In the future, this is probably best handled with classes rather than dictionaries.
When you assign multiple variables to reflect a dictionary, they don’t copy its values. They are the same dictionary as each other. Changing one changes every other one. Using .copy()
gets around that, but classes will be more flexible for this type of use and should have fewer ‘gotcha’ problems.
solved why are the top five color red red red red red?