Home >>Python Built-in Functions >Python int() Function
Python int() function is used to convert the given input value of any base into an integer number of decimal base.
Syntax:int(value, base)
Parameter | Description |
---|---|
value | This parameter defines a number or a string that can be converted into an integer number. |
base | This parameter defines a number representing the number format. |
x = int(5.55)
print(x)
x = int('100',8)
print(x)