1var.isdigit()
2#return true if all the chars in the string are numbers
3#return false if not all the chars in the string are numbers
1f = 1.23
2
3print(f.is_integer())
4# False
5
6f_i = 100.0
7
8print(f_i.is_integer())
9# True
10
1# From stackoverflow
2# If you need to do this, do
3
4isinstance(<var>, int)
5
6# unless you are in Python 2.x in which case you want
7
8isinstance(<var>, (int, long))