Anyone Can Code.
Identity operators are used to check whether two objects are identical.
There are two identity operators:
is not. It's pretty
self-explanatory what these two do.
is checks whether two objects are identitcal
is not checks whether two objects are not the same.
x = 6 y = 5 print(x is not y) y = 6 print(x is y)True True
That's it for this tutorial! Click Next to access the next tutorial!