Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (47.6k points)

I want to get, given a character, its ASCII value.

For example, for the character a, I want to get 97, and vice versa.

1 Answer

0 votes
by (106k points)

You can use chr() and ord():

>>> chr(97) 

'a' 

>>> ord('a') 

97

Related questions

0 votes
1 answer
0 votes
1 answer
+3 votes
2 answers
0 votes
1 answer
asked Aug 16, 2019 in Java by Shubham (3.9k points)
0 votes
1 answer

Browse Categories

...