dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Friday Apr 10th 2020 by Srinath M S

Language: Web, Expertise: Beginner: See how to check whether or not a number is finite in Python.

Use the math module's isfinite method to determine if a value is finite or not. If it is not a number, the function returns false.

See below for an example:

math.isfinite(10) returns True
Home
Mobile Site | Full Site