Understanding mutability in Python [closed]
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I have this snippet: a = [1,2,3] b = a b = [4,5,6] # a doesnt change and this: a = [1,2,3] b = a b[0] = 5 # a also changes How is b 's