Learn and Learn

Learn And Learn - great place for tutorials, references and how-to

Python isfinite() Function

isfinite() function exists in Standard math Library of Python Programming Language. It is used to determine whether a specific Python number is a finite number or not.


Syntax of isfinite() in python

The syntax of isfinite() function in python is:
math.isfinite( x )


isfinite() Function Parameters

x is any valid Python number (Both Positive and negative). This parameter is required.

Note: if the x parameter is not a number, isfinite() function will return an error.


Python isfinite() Function Compatibility

Python 2.x – Yes
Python 3.x – Yes


Return Value in isfinite() in Python

The return value of isfinite() function is either True or False.

If parameter x is finite, isfinite() function returns True.
If Parameter x is either an infinity or a NaN (Not a Number in computing), isfinite() returns False.


Python isfinite() Function Example

Output of Python


LearnAndLearn.com © 2018 - All rights reserved