What is the output of print(float('nan') == float('nan')) in Python?
print(float('nan') == float('nan'))
Correct answer
A. False
6 views
A. False
6 views
NaN is not equal to anything, including itself.
Asked in: Python Interview Output Prediction
https://docs.python.org/3/reference/datamodel.htmlNot sure why the answer is A? Ask here and get an explanation.