Skip to content

Open In Colab

Python ASCII Encoding

ASCII abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices.

ASCII Value of a Character

Print ASCII value of character 'a'.

print(ord('a'))
97

Print ASCII value of character 'A'.

print(ord('A'))
65

Character from ASCII Value

Print character represented by ACII value 97.

print(chr(97))
a

Print character represented by ACII value 65.

print(chr(65))
A

Open In Colab