convert a variable to integer python code example Example: convert string to integer in python int_var = int(string_var)