Learn about Python Program to Find ASCII Value of Character in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.
Python Program to Find ASCII Value of Character
# Python program to find ASCII value of character # input ch = input("Enter any character: ") # ascii value of character using ord() val = ord(ch) print("The ASCII value of " + ch + " is:", val)
Enter any character: f
The ASCII value of f is: 102
Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.
Similar Code : Find nth Fibonacci Number in Python