Python Program to Print ASCII Values

Python Program to Print ASCII Values

  • To print ASCII(American Standard Code for Information Interchange) value of all characters in python, just follow the program given below. This python program will print all the character along with their ASCII values.

Source Code:

# Python Program - Print ASCII Values
      
for i in range(1, 255):
    ch = chr(i)
    print(i, "=", ch)
  • Here are some screenshot of the same program with run directly on python shell:

First Screenshot:

Second Screenshot:

 

Third Screenshot:

 

Fourth Screenshot:

 

Fifth Screenshot:

 

Sixth Screenshot:

 

Seventh Screenshot:

 

 

 

 

 

 

Comments