programming-examples/python/_Basics/Python Program to Find ASCII Value of Character.py

9 lines
242 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
# Program to find the ASCII value of the given character
# Change this value for a different result
c = 'p'
# Uncomment to take character from user
#c = input("Enter a character: ")
print("The ASCII value of '" + c + "' is",ord(c))