dic_u = {0:0}
a = dic_u
b = a
b.update({"x":1})
print(a)
主要涉及到浅拷贝的问题 运用copy模块的copy函数即可解决
import copy
dic_u = {0:0}
a = dic_u
b = copy.copy(a)
b.update({"x":1})
print(a)
dic_u = {0:0}
a = dic_u
b = a
b.update({"x":1})
print(a)
主要涉及到浅拷贝的问题 运用copy模块的copy函数即可解决
import copy
dic_u = {0:0}
a = dic_u
b = copy.copy(a)
b.update({"x":1})
print(a)