Results for “python replace site:docs.python.org”
docs.python.org
re — Regular expression operations — Python 3.15.2 documentation
This collides with Python's usage of the same character for the same purpose in string literals; for example, to match a literal backslash, one might have to ...
docs.python.org
string — Common string operations — Python 3.15.2 documentation
The replacement fields within the format_spec are substituted before the format_spec string is interpreted. This allows the formatting of a value to be dynamically specified.
docs.python.org
datetime — Basic date and time types — Python 3.15.2 documentation
Instance methods: date.replace(year=self.year, month=self.month, day=self.day)¶. Return a new date object with the same values, but with specified parameters updated. Example
docs.python.org
copy — Shallow and deep copy operations — Python 3.15.2 ...
Function copy.replace() is more limited than copy() and deepcopy() , and only supports named tuples created by ...
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.
docs.python.org
os — Miscellaneous operating system interfaces — Python 3.15.2 ...
Changed in version 3.6: Accepts a path-like object for old and new. os.replace(src, dst, * , src_dir_fd=None, dst_dir_fd=None)¶. Rename the file or directory ...
docs.python.org
codecs — Codec registry and base classes — Python 3.15.2 ...
Error Handlers¶ ; 'replace'. Replace with a replacement marker. On encoding, use ? (ASCII character). On decoding, use (U+FFFD, the official REPLACEMENT ...