ord(), chr()

Gives a string representing one Unicode character, return an integer represeting the unicode code point of that character

! only takes signle characters

Example:

ord('a') # Returns integer 97

This is the inverse of chr()

chr(97) # Returns character 'a'

Last updated