Jovito Jovito - 2 months ago 7
Python Question

Is there a list of all ASCII characters in python's standard library?

Is there a field or a function that would return all ASCII characters in python's standard library?

Answer

You can use the string module:

import string
print string.printable

which gives:

'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'