string — Common string operations — Python 3.15.2 documentation
Source code: Lib/string/__init__.py String constants: The constants defined in this module are: Custom string formatting: The built-in string class provides ...
Source code: Lib/string/__init__.py String constants: The constants defined in this module are: Custom string formatting: The built-in string class provides ...
Some operations are supported by several object types; in particular, practically all objects can be compared for equality, tested for truth value, and ...
If globals and locals are given, they are used for the global and local variables, respectively. If provided, locals can be any mapping object. Remember that at ...
The Python interpreter has a number of functions and types built into it that are always available. They are listed here in alphabetical order.Free variables are returned by locals() when it is called in function blocks, but not in class blocks.
A format string consists of zero or more “format units.” A format unit describes one Python object; it is usually a single character or a parenthesized sequence ...
Called by the format() built-in function, and by extension, evaluation of formatted string literals and the str. ... This class variable can be assigned a tuple ...
... reference on Python <3.12. # Using ``TypeAlias`` tells the type checker that this is a type alias declaration, # not a variable assignment to a string.
Source code: Lib/types.py This module defines utility functions to assist in dynamic creation of new types. It also defines names for some object types that ...