странно работает append()

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
>>> postan = [{"amp": []}]*4
>>> pprint(postan)
[{'amp': []}, {'amp': []}, {'amp': []}, {'amp': []}]
>>> postan[0]["amp"]
[]
>>> postan[1]["amp"]
[]
>>> postan[0]["amp"].append("a")
>>> pprint(postan)
[{'amp': ['a']}, {'amp': ['a']}, {'amp': ['a']}, {'amp': ['a']}]
>>> postan[0]["amp"]
['a']
>>> postan[1]["amp"]
['a']