pythoncomparisonidentity-operator

How do I achieve the effect of the === operator in Python?


How do I achieve the effect of the === operator in Python?

For example, I don't want False == 0 to be True.


Solution

  • Try variable is False. False is 0 returns False,