List as objects (3)
Consider:
a = [1, 2, 3]
b = [1, 2, 3]
print id(a)
print id(b)
b[0] = 5
print id(a)
print id(b)
which prints:
135445132
135367596
135445132
135367596
represented by the state diagram (at the end of the program), i.e.
changing b
does not affect
a
: