Convert string containing character to char-code in Python

ord('a')

Know more: