Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by www.adamsmith.haus #
 
PREVIOUS NEXT
Tagged: #How #check #number #integer #float
ADD COMMENT
Topic
Name
5+9 =