+ 1
How to write program to get ASCII value of a character??
5 Respostas
+ 1
#Something like this?
chord_dict={}
for each in range(33, 127):
chord_dict.update({each: chr(each)})
print(chord_dict)
+ 3
You can use the built-in function ord.
Use it on a letter, and you'll get the ASCII code.
+ 2
ord() function
changes a character into ascii
print(ord('a'))
>>>
97
chr() function
changes an ascii into character
print(chr(97))
>>>
a
+ 1
Thank you so much
+ 1
Thanks