ASCII to int:
ord('a')
gives 97
And back to a string:
- in Python2:
str(unichr(97))
- in Python3:
chr(97)
gives 'a'
More Related Contents:
- Python UnicodeDecodeError – Am I misunderstanding encode?
- Python Unicode Encode Error
- UnicodeEncodeError: ‘charmap’ codec can’t encode – character maps to , print function [duplicate]
- Generate random integers between 0 and 9
- Converting integer to string in Python
- Replace non-ASCII characters with a single space
- Converting integer to binary in python
- Convert floats to ints in Pandas?
- How can I check if a string represents an int, without using try/except?
- Character reading from file in Python
- Python & MySql: Unicode and Encoding
- Why (0-6) is -6 = False? [duplicate]
- Where is Python’s “best ASCII for this Unicode” database? [closed]
- RGB Int to RGB – Python
- How to print UTF-8 encoded text to the console in Python < 3?
- Finding the Values of the Arrow Keys in Python: Why are they triples?
- UnicodeEncodeError: ‘ascii’ codec can’t encode character at special name [duplicate]
- converting a list of integers into range in python
- How do you express binary literals in Python?
- In Python, how do I decode GZIP encoding?
- How to convert a string of space- and comma- separated numbers into a list of int? [duplicate]
- Splitting List That Contains Strings and Integers
- How do I check if raw input is integer in python 2.7?
- Reversing bits of Python integer
- Is there a built-in or more Pythonic way to try to parse a string to an integer
- Reading integers from binary file in Python
- How can I check if a string has a numeric value in it in Python? [duplicate]
- Convert a number to a list of integers [duplicate]
- Why is ‘\x’ invalid in Python?
- Detect whether a Python string is a number or a letter [duplicate]