str.title
Capitalizes word starts and lowercases the remaining cased characters.
CKTIS / Python
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Capitalizes word starts and lowercases the remaining cased characters.
Returns the Unicode uppercase mapping of the text.
Pads a string with ASCII zeroes on the left to reach the requested width.
sys.stdout is Python's text stream for standard output, used by print() by default. It supports direct text writes and buffer flushing; it does not necessarily point to a terminal.
Collects separate elapsed durations from repeated timing experiments.
Measures the elapsed time for a specified number of repetitions.
Stores a timing statement and setup operation for repeated measurements with the same configuration.
This class attribute gives the simple type name without its module or enclosing classes.
Associate ordered metadata with a base type for tools that recognize it.
Use Any where a value has a dynamically checked type.
Describe a callable by its parameter types and return type.
Tell the type checker to treat an expression as the target type.
Mark an attribute as belonging to the class for static analysis.
typing.Dict describes dictionary key and value types. Since Python 3.9 it is a deprecated alias of dict; use dict[K, V] in new code. The annotation does not validate data at runtime.
Declare a name that a type checker should reject rebinding or overriding in a subclass.
Declare a generic class using Generic[T] as its base and a previously declared type variable T as the argument.
typing.List[T] describes a list of elements of type T. It remains available in Python 3.14, but new code should prefer list[T].
Restrict a static type to particular literal values.
Define an immutable tuple subclass with named, annotated fields.
Describe the bottom type, which has no possible values.
Create a distinct static subtype of an existing type, useful for separating identifiers with the same representation.
Mark an individual TypedDict key as omissible, even when the other keys are required by default.
Optional[T] allows either T or None and is equivalent to a union with None.
Declare alternative argument and result relationships for a static type checker.