Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...Fortunately, there are some string concatenation functions in the string module that are implemented in C. In particular, string.joinfields(list_of_strings, delimiter) concatenates a list of strings, placing a delimiter of choice between each two strings. Nothing stops us from concatenating a list of characters (which are just strings of length one in Python), using the empty string as delimiter. Lo and behold: import string def f6(list): return string.joinf...
...f string methods and a new regular expression engine: String methods mean that you can now say s.lower() etc. instead of importing the string module and saying string.lower(s) etc. One peculiarity is that the equivalent of string.join(sequence, delimiter) is delimiter.join(sequence). Use " ".join(sequence) for the effect of string.join(sequence); to make this more readable, try space=" " first. Note that the maxsplit argument defaults in split() and replace() hav...
...f string methods and a new regular expression engine: String methods mean that you can now say s.lower() etc. instead of importing the string module and saying string.lower(s) etc. One peculiarity is that the equivalent of string.join(sequence, delimiter) is delimiter.join(sequence). Use " ".join(sequence) for the effect of string.join(sequence); to make this more readable, try space=" " first. Note that the maxsplit argument defaults in split() and replace() have changed...
Version: None
Released: Dec. 3, 2024
This is the eighth maintenance release of Python 3.12 Python 3.12.8 is the latest maintenance release of Python 3.12, containing more than 250 bug fixes, build improvements and documentation changes since 3.12.7. Security content in this release gh-126623: Upgraded libexpat to 2.6.4 to fix CVE-2024-50602. gh-124651: Properly …
View Release Notes
Released: Dec. 8, 2023
This is the first maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.1 is the latest maintenance release, containing more than 400 bugfixes, build improvements and documentation changes since 3.12.0. Major new features …
Released: Feb. 6, 2024
This is the second maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.2 is the latest maintenance release, containing more than 350 bugfixes, build improvements and documentation changes since 3.12.1. Major new features …
Released: April 9, 2024
This is the third maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.3 is the latest maintenance release, containing more than 300 bugfixes, build improvements and documentation changes since 3.12.2. Major new features …
Released: June 6, 2024
This is the fourth maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.4 is the latest maintenance release, containing more than 250 bugfixes, build improvements and documentation changes since 3.12.3. Major new features …
Released: Oct. 1, 2024
This is the seventh maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.7 is the latest maintenance release, containing about 120 bug fixes, build improvements and documentation changes since 3.12.6. Major new features …
Released: Feb. 4, 2025
This is the ninth maintenance release of Python 3.12 Python 3.12.9 is the latest maintenance release of Python 3.12, containing about 180 bug fixes, build improvements and documentation changes since 3.12.8. Major new features of the 3.12 series, compared to 3.11 New features More flexible f-string parsing, allowing many …
Released: April 8, 2025
This is the tenth maintenance release of Python 3.12 Python 3.12.10 is the latest maintenance release of Python 3.12, and the last full maintenance release. Subsequent releases of 3.12 will be security-fixes only. This last maintenance release contains about 230 bug fixes, build improvements and documentation changes since 3.12.9. …
Released: Aug. 6, 2024
This is the fifth maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.5 is the latest maintenance release, containing more than 250 bugfixes, build improvements and documentation changes since 3.12.4. This version of …
...in Functions Two new intrinsic functions for class testing were introduced (since the functionality had to be implemented in the C API, there was no reason not to make it accessible to Python programmers). issubclass(D, C) returns true iff class D is derived from class C, directly or indirectly. issubclass(C, C) always returns true. Both arguments must be class objects. isinstance(x, C) returns true iff x is an instance of C or of a (direct or indirect) subclass of C. The...
Released: Sept. 6, 2023
This is the second release candidate of Python 3.12.0 This release, 3.12.0rc2, is the last release preview for Python 3.12. There will be no ABI changes from this point forward in the 3.12 series. The intent is for the final release of 3.12.0, scheduled for Monday, 2023-10-02, to be …
Released: Sept. 19, 2023
This is the third release candidate of Python 3.12.0 This release, 3.12.0rc3, is the absolutely last release preview for Python 3.12. There will be no ABI changes from this point forward in the 3.12 series. The intent is for the final release of 3.12.0, scheduled for Monday, 2023-10-02, to …
Released: Aug. 6, 2023
This is the first release candidate of Python 3.12.0 This release, 3.12.0rc1, is the penultimate release preview. Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release. The second candidate (and the last planned release …
Released: Sept. 6, 2024
This is the sixth maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.6 is the latest maintenance release, containing about 90 bugfixes, build improvements and documentation changes since 3.12.5. This is an expedited …
Released: June 19, 2023
This is a beta preview of Python 3.12 Python 3.12 is still in development. This release, 3.12.0b3, is the third of four beta release previews of 3.12. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their …
Released: July 11, 2023
This is a beta preview of Python 3.12 Python 3.12 is still in development. This release, 3.12.0b4, is the final of four beta release previews of 3.12. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their …
...from __future__ import nested_scopes" in 2.1[.1]). This may change the meaning of code like the following: <pre> def f(<font color="red">str</font>): def g(x): return <font color="red">str</font>(x) return g System Message: WARNING/2 (<string>, line 68) Definition list ends without a blank line; unexpected unindent. </pre> In this example, the use of <font color="red">str</font> inside the inner funct...
If you didn't find what you need, try your search in the Python language documentation.