Can any one answer what is meant by "ord" and "chr" in ASCII code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can any one answer what is meant by "ord" and "chr" in ASCII code?

Fullform

22nd Apr 2019, 6:36 PM
Dileep Patcha
Dileep Patcha - avatar
2 Answers
+ 5
ord('a') 97 using ord you get in return the ASCII value in integer of a char. chr(97) 'a' using chr you get in return the char of a ASCII value given in integer format.
22nd Apr 2019, 6:44 PM
Anya
Anya - avatar
+ 2
https://docs.python.org/3/library/functions.html#ord https://docs.python.org/3/library/functions.html#chr
22nd Apr 2019, 7:20 PM
Diego
Diego - avatar