liveBook · Manning

String module

The string module is a Python standard-library module providing constants and utilities for processing text and character classes.

How 2 Manning books explain it

Python How-To

string is a Python standard-library module providing constants and utilities for common string character sets and operations.

How it is used
Supports input validation, data conversion, and formatting tasks in practical Python applications.
How deep it goes
Explains validation methods, conversion pitfalls, and formatting choices through examples, while deferring deeper split and rsplit details.
Examples
Uses age input, username checks, numeric strings, structured text, fruit lists, and visited-country lists.
What you can do after
Apply string methods and built-ins to validate text, convert represented values, and split or join application data.

Read how Python How-To explains string module →

The Quick Python Book, Fourth Edition

string is a Python standard-library module providing constants and utilities for common string-processing tasks.

How it is used
Supports practical text cleaning by supplying character sets for translation, filtering, and membership tests.
How deep it goes
Explains named constants and demonstrates reusable translation tables, but stops short of implementation internals.
Examples
Uses punctuation removal, character-set membership, digit and case tests, and Moby-Dick word-cleaning files.
What you can do after
Apply the module in text-cleaning programs with str.maketrans(), translate(), and reusable character constants.

Read how The Quick Python Book, Fourth Edition explains string module →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.