Python Program to Find the ASCII Value of a Character

Python Programming Examples

Python String Programs

This Python example code demonstrates a simple Python program to find the ASCII value of a character and print the output to the screen.



Program:

ch = 'G'
print("The ASCII value of '" + ch + "' is", ord(ch))

Program Output:

The ASCII value of 'G' is 71


Found This Page Useful? Share It!
Get the Latest Tutorials and Updates
Join us on Telegram

Keep W3schools Growing with Your Support!
❤️ Support W3schools