- Functions Defined
- Compound Data Types
- Intuitive Interpretation
- All the Flow You’d Expect
- Quick & Easy to Learn
- Get Started
- Download
- Docs
- Jobs
- Latest News
- Python 3.10.0
- Major new features of the 3.10 series, compared to 3.9
- More resources
- And now for something completely different
- Files
- Python 3.10.6
- This is the sixth maintenance release of Python 3.10
- Major new features of the 3.10 series, compared to 3.9
- More resources
- And now for something completely different
- Files
Functions Defined
The core of extensible programming is defining functions. Python allows mandatory and optional arguments, keyword arguments, and even arbitrary argument lists. More about defining functions in Python 3
# Python 3: List comprehensions >>> fruits = ['Banana', 'Apple', 'Lime'] >>> loud_fruits = [fruit.upper() for fruit in fruits] >>> print(loud_fruits) ['BANANA', 'APPLE', 'LIME'] # List and the enumerate function >>> list(enumerate(fruits)) [(0, 'Banana'), (1, 'Apple'), (2, 'Lime')]
Compound Data Types
Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. More about lists in Python 3
# Python 3: Simple arithmetic >>> 1 / 2 0.5 >>> 2 ** 3 8 >>> 17 / 3 # classic division returns a float 5.666666666666667 >>> 17 // 3 # floor division 5
Intuitive Interpretation
Calculations are simple with Python, and expression syntax is straightforward: the operators + , — , * and / work as expected; parentheses () can be used for grouping. More about simple math functions in Python 3.
# For loop on a list >>> numbers = [2, 4, 6, 8] >>> product = 1 >>> for number in numbers: . product = product * number . >>> print('The product is:', product) The product is: 384
All the Flow You’d Expect
Python knows the usual control flow statements that other languages speak — if , for , while and range — with some of its own twists, of course. More control flow tools in Python 3
# Simple output (with Unicode) >>> print("Hello, I'm Python!") Hello, I'm Python! # Input, assignment >>> name = input('What is your name?\n') What is your name? Python >>> print(f'Hi, .') Hi, Python.
Quick & Easy to Learn
Experienced programmers in any other language can pick up Python very quickly, and beginners find the clean syntax and indentation structure easy to learn. Whet your appetite with our Python 3 overview.
Python is a programming language that lets you work quickly and integrate systems more effectively. Learn More
Get Started
Whether you’re new to programming or an experienced developer, it’s easy to learn and use Python.
Download
Python source code and installers are available for download for all versions!
Docs
Documentation for Python’s standard library, along with tutorials and guides, are available online.
Jobs
Looking for work or have a Python related position that you’re trying to hire for? Our relaunched community-run job board is the place to go.
Latest News
Python 3.10.0
Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.
Major new features of the 3.10 series, compared to 3.9
Among the new major new features and changes so far:
- PEP 623 — Deprecate and prepare for the removal of the wstr member in PyUnicodeObject.
- PEP 604 — Allow writing union types as X | Y
- PEP 612 — Parameter Specification Variables
- PEP 626 — Precise line numbers for debugging and other tools.
- PEP 618 — Add Optional Length-Checking To zip.
- bpo-12782: Parenthesized context managers are now officially allowed.
- PEP 632 — Deprecate distutils module.
- PEP 613 — Explicit Type Aliases
- PEP 634 — Structural Pattern Matching: Specification
- PEP 635 — Structural Pattern Matching: Motivation and Rationale
- PEP 636 — Structural Pattern Matching: Tutorial
- PEP 644 — Require OpenSSL 1.1.1 or newer
- PEP 624 — Remove Py_UNICODE encoder APIs
- PEP 597 — Add optional EncodingWarning
bpo-38605: from __future__ import annotations (PEP 563) used to be on this list in previous pre-releases but it has been postponed to Python 3.11 due to some compatibility concerns. You can read the Steering Council communication about it here to learn more.
bpo-44828: A change in the newly released macOS 12 Monterey caused file open and save windows in IDLE and other tkinter applications to be unusable. As of 2021-11-03, the macOS 64-bit universal2 installer file for this release was updated to include a fix in the third-party Tk library for this problem. All other files are unchanged from the original 3.10.0 installer. If you have already installed 3.10.0 from here and encounter this problem on macOS 12 Monterey, download and run the updated installer linked below.
More resources
And now for something completely different
For a Schwarzschild black hole (a black hole with no rotation or electromagnetic charge), given a free fall particle starting at the event horizon, the maximum proper time (which happens when it falls without angular velocity) it will experience to fall into the singularity is π*M (in natural units), where M is the mass of the black hole. For Sagittarius A* (the black hole at the centre of the milky way) this time is approximately 1 minute.
Schwarzschild black holes are also unique because they have a space-like singularity at their core, which means that the singularity doesn’t happen at a specific point in space but happens at a specific point in time (the future). This means once you are inside the event horizon you cannot point with your finger towards the direction the singularity is located because the singularity happens in your future: no matter where you move, you will «fall» into it.
Files
Version | Operating System | Description | MD5 Sum | File Size | GPG |
---|---|---|---|---|---|
Gzipped source tarball | Source release | 729e36388ae9a832b01cf9138921b383 | 25007016 | SIG | |
XZ compressed source tarball | Source release | 3e7035d272680f80e3ce4e8eb492d580 | 18726176 | SIG | |
macOS 64-bit universal2 installer | macOS | for macOS 10.9 and later (updated for macOS 12 Monterey) | 8575cc983035ea2f0414e25ce0289ab8 | 39735213 | SIG |
Windows embeddable package (32-bit) | Windows | dc9d1abc644dd78f5e48edae38c7bc6b | 7521592 | SIG | |
Windows embeddable package (64-bit) | Windows | 340408540eeff359d5eaf93139ab90fd | 8474319 | SIG | |
Windows help file | Windows | 9d7b80c1c23cfb2cecd63ac4fac9766e | 9559706 | SIG | |
Windows installer (32-bit) | Windows | 133aa48145032e341ad2a000cd3bff50 | 27194856 | SIG | |
Windows installer (64-bit) | Windows | Recommended | c3917c08a7fe85db7203da6dcaa99a70 | 28315928 | SIG |
- About
- Applications
- Quotes
- Getting Started
- Help
- Python Brochure
- All releases
- Source code
- Windows
- macOS
- Other Platforms
- License
- Alternative Implementations
- Docs
- Audio/Visual Talks
- Beginner’s Guide
- Developer’s Guide
- FAQ
- Non-English Docs
- PEP Index
- Python Books
- Python Essays
- Diversity
- Mailing Lists
- IRC
- Forums
- PSF Annual Impact Report
- Python Conferences
- Special Interest Groups
- Python Logo
- Python Wiki
- Code of Conduct
- Community Awards
- Get Involved
- Shared Stories
- Arts
- Business
- Education
- Engineering
- Government
- Scientific
- Software Development
- Python News
- PSF Newsletter
- PSF News
- PyCon US News
- News from the Community
- Python Events
- User Group Events
- Python Events Archive
- User Group Events Archive
- Submit an Event
- Developer’s Guide
- Issue Tracker
- python-dev list
- Core Mentorship
- Report a Security Issue
Python 3.10.6
This is the sixth maintenance release of Python 3.10
Python 3.10.6 is the newest major release of the Python programming language, and it contains many new features and optimizations.
Major new features of the 3.10 series, compared to 3.9
Among the new major new features and changes so far:
- PEP 623 — Deprecate and prepare for the removal of the wstr member in PyUnicodeObject.
- PEP 604 — Allow writing union types as X | Y
- PEP 612 — Parameter Specification Variables
- PEP 626 — Precise line numbers for debugging and other tools.
- PEP 618 — Add Optional Length-Checking To zip.
- bpo-12782: Parenthesized context managers are now officially allowed.
- PEP 632 — Deprecate distutils module.
- PEP 613 — Explicit Type Aliases
- PEP 634 — Structural Pattern Matching: Specification
- PEP 635 — Structural Pattern Matching: Motivation and Rationale
- PEP 636 — Structural Pattern Matching: Tutorial
- PEP 644 — Require OpenSSL 1.1.1 or newer
- PEP 624 — Remove Py_UNICODE encoder APIs
- PEP 597 — Add optional EncodingWarning
bpo-38605: from __future__ import annotations (PEP 563) used to be on this list in previous pre-releases but it has been postponed to Python 3.11 due to some compatibility concerns. You can read the Steering Council communication about it here to learn more.
More resources
And now for something completely different
A pentaquark is a human-made subatomic particle, consisting of four quarks and one antiquark bound together; they are not known to occur naturally or exist outside of experiments to create them. As quarks have a baryon number of (+1/3), and antiquarks of (−1/3), the pentaquark would have a total baryon number of 1 and thus would be a baryon. Further, because it has five quarks instead of the usual three found in regular baryons (a.k.a. ‘triquarks’), it is classified as an exotic baryon. The name pentaquark was coined by Claude Gignoux et al. (1987) and Harry J. Lipkin in 1987; however, the possibility of five-quark particles was identified as early as 1964 when Murray Gell-Mann first postulated the existence of quarks. Although predicted for decades, pentaquarks proved surprisingly tricky to discover and some physicists were beginning to suspect that an unknown law of nature prevented their production.
Files
Version Operating System Description MD5 Sum File Size GPG Gzipped source tarball Source release d76638ca8bf57e44ef0841d2cde557a0 25986768 SIG XZ compressed source tarball Source release afc7e14f7118d10d1ba95ae8e2134bf0 19600672 SIG macOS 64-bit universal2 installer macOS for macOS 10.9 and later 2ce68dc6cb870ed3beea8a20b0de71fc 40826114 SIG Windows embeddable package (32-bit) Windows a62cca7ea561a037e54b4c0d120c2b0a 7608928 SIG Windows embeddable package (64-bit) Windows 37303f03e19563fa87722d9df11d0fa0 8585728 SIG Windows help file Windows 0aee63c8fb87dc71bf2bcc1f62231389 9329034 SIG Windows installer (32-bit) Windows c4aa2cd7d62304c804e45a51696f2a88 27750096 SIG Windows installer (64-bit) Windows Recommended 8f46453e68ef38e5544a76d84df3994c 28916488 SIG - About
- Applications
- Quotes
- Getting Started
- Help
- Python Brochure
- All releases
- Source code
- Windows
- macOS
- Other Platforms
- License
- Alternative Implementations
- Docs
- Audio/Visual Talks
- Beginner’s Guide
- Developer’s Guide
- FAQ
- Non-English Docs
- PEP Index
- Python Books
- Python Essays
- Diversity
- Mailing Lists
- IRC
- Forums
- PSF Annual Impact Report
- Python Conferences
- Special Interest Groups
- Python Logo
- Python Wiki
- Code of Conduct
- Community Awards
- Get Involved
- Shared Stories
- Arts
- Business
- Education
- Engineering
- Government
- Scientific
- Software Development
- Python News
- PSF Newsletter
- PSF News
- PyCon US News
- News from the Community
- Python Events
- User Group Events
- Python Events Archive
- User Group Events Archive
- Submit an Event
- Developer’s Guide
- Issue Tracker
- python-dev list
- Core Mentorship
- Report a Security Issue