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
1.4m articles
1.4m replys
5 comments
57.0k users