Someone said to me Everything in python is an object. Like the example below, python just points to the same address for the same value.
a = 1
b = 1
print(id(a), id(b)) # Same!
print(a is b) # True
But this rule seems like not being applied a list.
a = [1]
b = [1]
print(id(a), id(b)) # !=
print(a is b) # False
I tested this for a Tuple, but it also didn't work. So I guess it's not about whether they are mutables or not. Why does this happen?