search code ascii python

# Program to find the ASCII value of a character

ch = input("Enter any character: ")

print("The ASCII value of char " + ch + " is: ",ord(ch))

Here is what the above code is Doing:
1. We take input from the user and store it in the variable ch.
2. Then we use the ord() function to find the ASCII value of the character stored in ch.
3. Finally, we print the ASCII value of the character.