if python nan code example
Example 1: python test is nan
math.isnan(n)
Example 2: python3 is nan
>>> import math
>>> x = float('nan')
>>> math.isnan(x)
True
math.isnan(n)
>>> import math
>>> x = float('nan')
>>> math.isnan(x)
True