ID EN
Built-in Types

is_integer

Python 3.11

Return True if the float instance is finite with integral value, and False otherwise:

Syntax

PYTHON
float.is_integer()

Examples

Example 1
PYTHON
>>> (-2.0).is_integer()
True
>>> (3.2).is_integer()
False