Answers for "How to check if a number is an integer or a float"

0

How to check if a number is an integer or a float

number = 25.9

check_int = isinstance(25.9, int)
print(check_int)
OUTPUT
False

check_float = isinstance(25.9, float)
print(check_float)
OUTPUT
True
Posted by: Guest on May-05-2022

Code answers related to "How to check if a number is an integer or a float"

Browse Popular Code Answers by Language