标签: python list insert int element
>>> a = 100 >>> b =a >>> b = b+ 10 >>> b 110 >>> a 100 >>> a = [1,2,3] >>> b = a >>> b.insert(0,0) >>> b [0, 1, 2, 3] >>> a [0, 1, 2, 3]
为什么a为int且a为list时行为有所不同?如果我想保留list a ??
a
int
list
list a