+ 1

How can we get ascii value of a digit and vice versa

How to convert A to 65 and 97 to a

29th Aug 2019, 9:46 AM
Rajat Srivastava
Rajat Srivastava - avatar
4 Respostas
+ 2
ord('A') -> 65 chr(65) -> 'A'
29th Aug 2019, 10:19 AM
Trigger
Trigger - avatar
+ 1
To convert 97 to a: print(chr(int(input())))
29th Aug 2019, 9:51 AM
Théophile
Théophile - avatar
+ 1
Please tell how to convert A to 65 also
29th Aug 2019, 10:01 AM
Rajat Srivastava
Rajat Srivastava - avatar
0
Can you tell how can I use the conversion in a loop
29th Aug 2019, 9:51 AM
Rajat Srivastava
Rajat Srivastava - avatar