To print ASCII value of any character in python, just follow the program given below. This python program will print all the character along with their ASCII values.
Following python program will print all the 255 character along with their ASCII values:
# Python Program - Print ASCII Values for i in range(1, 255): ch = chr(i) print(i, "=", ch)
Here are all the sample runs of above python program illustrating how to print ASCII values of any character. First Snapshot:
You may also like to learn or practice the same program in other popular programming languages: