how to find the ascii value of character in python 1

how to find the ascii value of character in python

# ASCII stands for American Standard Code for Information Interchange.
# It is a numeric value given to different characters and symbols, 
# for computers to store and manipulate. 
# Use - ord() function to find this value.

print(ord("A"))
# output: 65
# Keep in mind that capital and simple of the same letter have different values.
print(ord("a"))
# output: 97

Here is what the above code is Doing:
1. ord() function is used to find the ASCII value of a character.
2. The ASCII value of ‘A’ is 65.
3. The ASCII value of ‘a’ is 97.

Similar Posts