string — Common string operations¶
Source code: Lib/string/__init__.py
String constants¶
The constants defined in this module are:
- string.ascii_letters¶
The concatenation of the
ascii_lowercaseandascii_uppercaseconstants described below. This value is not locale-dependent.
- string.ascii_lowercase¶
The lowercase letters
'abcdefghijklmnopqrstuvwxyz'. This value is not locale-dependent and will not change.
- string.ascii_uppercase¶
The uppercase letters
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. This value is not locale-dependent and will not change.
- string.digits¶
The string
'0123456789'.
- string.hexdigits¶
The string
'0123456789abcdefABCDEF'.
- string.octdigits¶
The string
'01234567'.
- string.punctuation¶
String of ASCII characters which are considered punctuation characters in the
Clocale:!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~.
- string.printable¶
String of ASCII characters which are considered printable by Python. This is a combination of
digits,ascii_letters,