7. String Services¶
The modules described in this chapter provide a wide range of string manipulation operations.
In addition, Python’s built-in string classes support the sequence type methods
described in the Sequence Types — str, bytes, bytearray, list, tuple, range section, and also the string-specific methods
described in the String Methods section. To output formatted strings,
see the String Formatting section. Also, see the re
module for
string functions based on regular expressions.
- 7.1.
string
— Common string operations - 7.2.
re
— Regular expression operations - 7.3.
struct
— Interpret bytes as packed binary data - 7.4.
difflib
— Helpers for computing deltas - 7.5.
textwrap
— Text wrapping and filling - 7.6.
codecs
— Codec registry and base classes - 7.7.
unicodedata
— Unicode Database - 7.8.
stringprep
— Internet String Preparation