How to convert a single character to its integer value in Python?

PythonServer Side ProgrammingProgramming

Each character is associated with an ASCII value which is a unique number. It is obtained by ord() function.

>>> ord('A')
65
>>> ord('+')
43
>>> ord(' ')


raja
Published on 08-Feb-2018 18:58:17
Advertisements