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 ...
To use formatted string literals, begin a string with f or F before the opening quotation mark or triple quotation mark. Inside this string, you can write a ...
Source code: Lib/annotationlib.py The annotationlib module provides tools for introspecting annotations on modules, classes, and functions.annotationlib.type_repr(value)¶. Convert an arbitrary Python value to a format suitable for use by the STRING format.
1 day ago · If the argument is a string, then the string is looked up as the name of a module, function, class, method, keyword, or documentation topic, and a help page is printed on the console.
Some operations are supported by several object types; in particular, practically all objects can be compared for equality, tested for truth value, and ...
Python supports numeric, string and bytes literals. Format strings and template strings are treated as string literals. Numeric literals consist of a single NUMBER token, which names an integer, floating-point number, or an imaginary number.
22 hours ago · html.unescape(s) ¶ Convert all named and numeric character references (e.g. >, >, >) in the string s to the corresponding Unicode characters. This function uses the rules defined by the HTML 5 standard for both valid and invalid character references, and the list of HTML 5 named character references. Added in version 3.4.
Source code: Lib/typing.py This module provides runtime support for type hints. Consider the function below: The function surface_area_of_cube takes an ...
This library reference manual describes the standard library distributed with Python. It also describes some of the optional components that are commonly included in Python distributions.
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 ...
22 hours ago · Source code: Lib/html/parser.py This module defines a class HTMLParser which serves as the basis for parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML. Example HTML Parser...
1 day ago · The format_spec argument is a string that contains a description of the formatting options desired. The interpretation of the format_spec argument is up to the type implementing __format__ (), however most classes will either delegate formatting to one of the built-in types, or use a similar formatting option syntax.