Python math.isnan() Method

Math Methods : Check whether a value is NaN or not

Definition and Usage

The math.isnan() method checks whether a value is NaN (Not a Number), or not.

This method returns True if the specified value is a NaN, otherwise it returns False.

Syntax

math.isnan(x)

Parameter Values

Parameter Description
x Required. The value to check

Technical Details

Return Value: A bool value, True if the value is NaN, otherwise False
Python Version: 3.5