covert string characters to int in python code example Example: python convert character to integer >>> chr(97) 'a' >>> ord('a') 97 >>> int('1') 1