Built-in Functions
int()
Convert a value to an integer.
int(value=0, base=10)
int() converts a whole-number value or suitable numeric text to an integer. When converting text in another number base, provide the base argument.
Parameters
| Name | Description |
|---|---|
| value | A number or numeric string to convert. If omitted, it defaults to 0. |
| base | The number base for a string value; it defaults to 10. |
Returns
An integer.
Try it
Run it and change it
text = "12" number = int(text) print(number + 3)