Search notes:

Python: int

int(s) can be used to convert a string (s) that represents a number into an integer.
The second, optional, parameter specifies the base of the string to be converted number. For example, if the second parameter is set to 16, it converts a hexadecimal string into an integer.
print(int('7') * int('6'))
#
# 42

print(int('ff', 16))
#
# 255
Github repository about-Python, path: /builtin-functions/int.py

See also

float() and str()
Python: Built in functions

Index