Python Concatenated list of dictionaries modifies all instances of dictionary inside the list if one of the dictionary is updated

后端 未结 0 1593
庸人自扰
庸人自扰 2021-01-27 18:01

I have a simple scenario where Python (3.7, tested also 3.5) does not seem to behave as I expect. putting it simply:

a = [{"c":1, "d":2}]
a
[{         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题