Python program to print the ASCII value of a character

Python program to print the ASCII value of a character. In the Python programming language, an ASCII value is used. In the Python programming language, this software will assist you in finding ASCII values. In the computer department, ASCII values are the most significant. In computers, telecommunications equipment, and other devices, ASCII codes represent text. While they accept a large number of additional characters, most modern character encoding schemes are based on ASCII.

a = 'D'
print("ASCII value '" + a + "' is", ord(a))

 

Output:

ASCII value ‘D’ is 68