Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonIdentity vs equalitySingle-choice MCQ

Why does the membership test below return True even though nan == nan is False?

nan = float('nan') print(nan == nan) # False print(nan in [nan]) # ???