int()
function returns the specified value into an integer.
int(*value, base*)
Here,
Note: If the value is float, the conversion truncates towards zero. And if the number is not a number
i.e if the base is given, then the number must be a string or Unicode object representing a literal base. The default base is 10. Values allowed are 0 and 2-36.
>>> int(0o10)
8
>>> int(0x10)
16
>>> int(0b10)
2
>>> int('0101', 2)
5
>>> int('0101', 8)
65
>>> int('0101', 16)
257
>>> int('0101', 10)
101
>>> int("99") # string
99
>>> int(3.14)
3
>>> int(3.14e10)
31400000000L
>>> int(-3.14)
-3
>>> int('-100')
-100
>>> int('+100')
100
>>> int('100')
100