If I am not mistaken a is b
should return True
if a
and b
point to the same object. With two equal lists it returns False
because the lists are two different lists. I thought that immutable objects didn't have this problem but when I put in:
a = (1, 2, 3)
b = (1, 2, 3)
a is b #returns false
I thought that this should return True
since a
and b
point to an immutable object that has the same value. Why isn't a
pointing to the same object as b
when I use tuples?