SyntaxFix
Write A Post
Hire A Developer
Questions
You are correct in that your list contains a reference to the original dictionary.
a.append(b.copy()) should do the trick.
a.append(b.copy())
Bear in mind that this makes a shallow copy. An alternative is to use copy.deepcopy(b), which makes a deep copy.
copy.deepcopy(b)