+ 4

Please explain this functions.

Hi everyone what is the chr and ord function in python and how is work.i use it but I don't know what they do please tell me.

10th Mar 2018, 10:02 AM
Maninder $ingh
Maninder $ingh - avatar
2 odpowiedzi
+ 10
Python has a table with Symbols which is translated to numbers, ord(a) = 97. chr does the opposite, it takes the number and translates it to a symbol. chr(97)= a
10th Mar 2018, 10:09 AM
Tomer Sim
Tomer Sim - avatar
+ 7
You can look up the Python built-in functions here: https://docs.python.org/3/library/functions.html
10th Mar 2018, 10:41 AM
David Ashton
David Ashton - avatar