Answers for "check if you y data type is an int or not python"

0

how to check value is integer or not in python

f = 1.23

print(f.is_integer())
# False

f_i = 100.0

print(f_i.is_integer())
# True
Posted by: Guest on December-08-2020
0

how do you see if a data type is an integer python

x = 10
if isinstance(x, int) == True:
  print("x is a integer")
if isinstance(x, str):
  print("x is a string")
Posted by: Guest on July-24-2021

Code answers related to "check if you y data type is an int or not python"

Python Answers by Framework

Browse Popular Code Answers by Language