DEV Community

Discussion on: A small Python Quiz

Collapse
variac profile image
Variac

float('nan')

Collapse
mridulnetizen profile image
Euxodous

That's cool! I'm wondering what's the reason for the same? Please explain

Collapse
bascodes profile image
Bas codes Author

Nan stands for “not a number” and comparing two things we know nothing about (other than what they’re not) is not reasonable.

Therefore by definition, nan is not the same as another nan.

Collapse
bascodes profile image
Bas codes Author

That’s correct!