The Text processing library is primarily used for the manipulation of strings, as well as for the processing of textual content.
3.1 string-- Common string manipulation
SOURCE location in:lib/string.py
3.1.1 string Constants
Here is the string constant defined in the string module:
String.ascii_letters
This constant contains uppercase and lowercase letters, and does not change with localization. It is actually a union of Ascii_loercase and ascii_uppercase .
String.ascii_lowercase
This constant is the lowercase letter ' abcdefghijklmnopqrstuvwxyz '.
String.ascii_uppercase
This constant is the capital letter ' ABCDEFGHIJKLMNOPQRSTUVWXYZ '.
String.digits
This constant is the number '0123456789'.
String.hexdigits
This constant is hexadecimal using the character '0123456789abcdefABCDEF'.
String.octdigits
This constant is octal using the character '01234567'.
String.punctuation
This constant is a punctuation mark in the ASCII table.
String.printable
This constant is a character that is printable. Contains numbers, letters, punctuation marks, and characters that can be used as spaces.
String.whitespace
This constant is a character that can be used as a space separator. Like ' \t\n\r\x0b\x0c '.
Cai Junsheng qq:9073204 Shenzhen
3. Text Processing Library