is_integer

Description

Returns True if the float instance is finite with integral value, and False otherwise.

Syntax

float. is_integer()

Return Value

bool

Example

>>> 1.5.is_integer()
False
>>> 1.0.is_integer()
True
>>> 1.4142135623730951.is_integer()
False