Articles → Python → Isnan Function In PythonIsnan Function In PythonIn this article, we will discuss the isnan function in Python.Purpose The isnan function returns false if the number is a valid number or else false.Example import math print("Is valid number : ", math.isnan(-3)) print("Is valid number : ", math.isnan(4)) print("Is valid number : ", math.isnan(float("nan")))Output Posted By - Karan Gupta Posted On - Thursday, April 18, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
import math print("Is valid number : ", math.isnan(-3)) print("Is valid number : ", math.isnan(4)) print("Is valid number : ", math.isnan(float("nan")))
Query/Feedback