Integer Methods
int.is_integer()
Return True for every built-in integer. The method is present for a shared interface with floats, whose is_integer() can return False. It does not validate strings or test whether an arbitrary object has type int.
Formal Syntax & Structure
python syntaxpython
value.is_integer()Return Value
bool
Always True for an int receiver.
Working Example
Example Snippetpython
print((0).is_integer())print((-42).is_integer())print((3.5).is_integer())