Because both variables a and b reference the same object.
a
b
a = ["A","E"] b = a print(id(a)) print(id(b)) print(a is b)
output:
140387638915552 140387638915552 True
2.1m questions
2.1m answers
60 comments
57.0k users