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