Results for “replace string method python docs code 2 class 1 site:docs.python.org file”
docs.python.org
Built-in Types — Python 3.15.2 documentation
Iteration-related types¶. Python supports a concept of iteration over containers. This is implemented using two distinct methods; these are used to allow user-defined classes to support iteration. Sequences, described below in more detail, always support the iteration methods.
docs.python.org
Built-in Types — Python 3.12.16 documentation
Iterator Types¶. Python supports a concept of iteration over containers. This is implemented using two distinct methods; these are used to allow user-defined classes to support iteration. Sequences, described below in more detail, always support the iteration methods.
docs.python.org
re — Regular expression operations — Python 3.15.2 documentation
Usually patterns will be expressed in Python code using this raw string ... The function takes a single Match argument, and returns the replacement string.
docs.python.org
5. Data Structures — Python 3.15.2 documentation
You might have noticed that methods like insert, remove or sort that only modify the list have no return value printed – they return the default None. [1] This is a design principle for all mutable data structures in Python.
docs.python.org
7. Input and output — Python 3.15.2 documentation
7.2.1. Methods of file objects¶ · f.readline() reads a single line from the file; a newline character ( · \n ) is left at the end of the string, and is only ...
docs.python.org
Built-in functions — Python 3.15.2 documentation
The filename argument should give the file from which the code was read; pass some recognizable value if it wasn't read from a file ( '<string>' is commonly ...
docs.python.org
codecs — Codec registry and base classes — Python 3.15.2 ...
Source code: Lib/codecs.py This module defines base classes for standard Python codecs (encoders and decoders) and provides access to the internal Python ...
docs.python.org
textwrap — Text wrapping and filling — Python 3.15.2 documentation
Source code: Lib/textwrap.py The textwrap module provides some convenience functions, as well as TextWrapper, the class that does all the work.