Python isnan function

isnan(x) function checks whether x is not a number (NaN). It's a method of math module. Python NaN is represented as float('nan').

>>> import math
>>> math.isnan(float('nan'))
True






















endmemo.com © 2024  | Terms of Use | Privacy | Home