Python Program to Find ASCII Value Of Given Character
This Python program finds ASCII value of a given character by user using built-in function ord()
.
Function ord()
returns ASCII value corresponding to a one-character string.
Python Source Code: Finding ASCII Value
# ASCII value of given character
character = input("Enter character: ")
print("ASCII value is: ", ord(character))
Output
Enter character: a ASCII value is: 97