I need to create a list consisting of 10 different Python objects that are falsy. The list must have the property that a is b
evaluates to False
whenever a
and b
are entries of the list in different positions. I find one, but two entries confuses me: 0<0
and False
.
I write some codes to test whether the two objects are identical.
bool(0>0 is False)
The result is False
.
But when I run the code:
mylist=[0>0,False]
bool(mylist[0] is mylist[1])
it returns True
.
So are the two objects identical or not in Python?