Python (programming language)
Last reviewed
May 2, 2026
Sources
16 citations
Review status
Source-backed
Revision
v1 ยท 4,447 words
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation.
Last reviewed
May 2, 2026
Sources
16 citations
Review status
Source-backed
Revision
v1 ยท 4,447 words
Add missing citations, update stale details, or suggest a clearer explanation.
Python is a general purpose, high level programming language created by Guido van Rossum and first released in 1991. It is dynamically typed, garbage collected, and supports multiple paradigms including object oriented, procedural, and functional programming. Significant whitespace replaces the brace blocks used by C derived languages, which is the single most visible feature of Python source code. Although the language was designed for general scripting and education, it has become the dominant language for artificial intelligence and machine learning, and it sits at the top of major popularity rankings in the mid 2020s.
| Field | Value |
|---|---|
| Designer | Guido van Rossum |
| Developer | Python Software Foundation, Python core team |
| First appeared | February 20, 1991 (version 0.9.0) |
| Stable release | 3.14.4, April 7, 2026 |
| Paradigms | Multi paradigm: object oriented, procedural, functional, structured, reflective |
| Typing | Duck, dynamic, strong; optional gradual static typing via annotations |
| Implementation language | C (CPython reference implementation) |
| License | Python Software Foundation License (BSD style, GPL compatible) |
| Filename extensions | .py, .pyc, .pyd, .pyi, .pyw, .pyz |
| Influenced by | ABC, Modula 3, C, Perl, Lisp, Haskell, Icon |
| Influenced | Boo, Cobra, Coconut, Go, Groovy, JavaScript (some features), Julia, Ruby, Swift |
| Website | python.org |
Python began in December 1989 at the Centrum Wiskunde and Informatica (CWI) in Amsterdam, where Guido van Rossum was working on the Amoeba distributed operating system. He had previously contributed to ABC, a teaching language developed at CWI in the early 1980s. ABC was elegant but isolated from the rest of the Unix world: it could not call C libraries easily and had no way to integrate with system services. Van Rossum wanted a language that kept ABC's emphasis on readability while also being a practical scripting tool for system administration on Amoeba. He started writing the interpreter over the Christmas holidays and named the project after the BBC comedy show Monty Python's Flying Circus, not the snake.
The first public release, version 0.9.0, was posted to the alt.sources Usenet newsgroup on February 20, 1991. It already included exception handling, functions, and the core types (str, list, dict). Python 1.0 followed in January 1994 and added the functional programming primitives lambda, map, filter, and reduce. Python 1.5 (1997) introduced keyword arguments. By the late 1990s a small but active community had formed around the comp.lang.python newsgroup and the BeOpen and CNRI groups that hosted van Rossum's work in the United States.
Python 2.0 was released on October 16, 2000. It added list comprehensions, a cycle detecting garbage collector, full Unicode support, and a more open community development process. Subsequent 2.x releases (2.1 through 2.7) refined the language for almost a decade.
Python 3.0 was released on December 3, 2008, after several years of design work codenamed Python 3000. Unlike previous versions, Python 3 was deliberately not backward compatible. The guiding principle, captured in PEP 3000, was to remove redundant ways of doing things that had accumulated since the early 1990s. The most disruptive changes were: print became a function, division between integers became true division (5/2 returned 2.5), strings became Unicode by default with a separate bytes type, and many standard library APIs were renamed. Migration was slow. Linux distributions, scientific projects, and large company codebases continued to ship Python 2 for years. The PSF eventually set January 1, 2020 as the formal end of life for Python 2.7. The final 2.7.18 patch shipped on April 20, 2020 and after that Python 2 received no further security updates.
Python 3.5 (September 2015) added async and await as keywords and introduced the typing module for optional type hints. Python 3.6 (December 2016) added f strings, which became the standard string interpolation syntax. Python 3.8 (October 2019) added the walrus operator (:=) for assignment expressions through the much debated PEP 572, the proposal that prompted van Rossum to step down as benevolent dictator for life in July 2018. Python 3.10 (October 2021) added structural pattern matching with the match and case statements.
Python 3.11 (October 2022) was the first release of the Faster CPython project, which Microsoft funded with van Rossum on the team. Benchmarks showed average speedups of about 1.25x over 3.10, with individual workloads ranging from 10 to 60 percent faster. Python 3.12 (October 2023) continued the work, added more flexible f string parsing (PEP 701), per interpreter GIL infrastructure (PEP 684), and a new generic syntax (PEP 695). Python 3.13 (October 2024) shipped the first experimental free threaded build (PEP 703) and an experimental copy and patch JIT compiler (PEP 744). Python 3.14, released October 7, 2025, made the free threaded build a tier one supported configuration through PEP 779, added template string literals (t strings) through PEP 750, deferred evaluation of annotations (PEP 649 and 749), and brought multiple isolated interpreters into the standard library through the new concurrent.interpreters module (PEP 734).
| Version | Release date | Notable additions |
|---|---|---|
| 0.9.0 | February 20, 1991 | First public release |
| 1.0 | January 1994 | lambda, map, filter, reduce |
| 2.0 | October 16, 2000 | List comprehensions, cyclic GC, Unicode |
| 2.7 | July 3, 2010 | Last 2.x release; EOL January 1, 2020 |
| 3.0 | December 3, 2008 | Backwards incompatible cleanup release |
| 3.5 | September 13, 2015 | async/await, typing module |
| 3.6 | December 23, 2016 | f strings, variable annotations |
| 3.8 | October 14, 2019 | Walrus operator, positional only parameters |
| 3.10 | October 4, 2021 | Structural pattern matching |
| 3.11 | October 24, 2022 | Faster CPython phase 1, exception groups, tomllib |
| 3.12 | October 2, 2023 | Per interpreter GIL, PEP 695 generics |
| 3.13 | October 7, 2024 | Experimental free threaded build, JIT, new REPL |
| 3.14 | October 7, 2025 | t strings, deferred annotations, concurrent.interpreters |
Python's stated design priorities are readability and simplicity. The cultural reference point is PEP 20, written by Tim Peters in 2004 and shipped inside the interpreter itself: typing import this at any Python prompt prints the Zen of Python. Among its 19 aphorisms are "Beautiful is better than ugly," "Explicit is better than implicit," "Simple is better than complex," "Readability counts," and "There should be one, and preferably only one, obvious way to do it." The last line is the most quoted in design discussions because it is an explicit rejection of TIMTOWTDI ("there is more than one way to do it"), the slogan of Perl, the language Python competed with most directly in the 1990s.
In practice the philosophy shows up in three places. Indentation is part of the syntax, so you cannot disagree about brace style. The standard library follows PEP 8, the style guide written by van Rossum, Barry Warsaw, and Alyssa Coghlan in 2001, which prescribes four space indentation, snake_case for functions and variables, and 79 character lines. And language additions are negotiated through Python Enhancement Proposals (PEPs), a public RFC process modeled loosely on the IETF's. PEPs are numbered sequentially and live at peps.python.org.
Python is dynamically typed: variables are names bound to objects, and the type of the object can change over the lifetime of the name. It is also strongly typed: the interpreter does not silently coerce a string into a number, for example, and an attempt to add a string to an integer raises TypeError. Memory is managed automatically through reference counting plus a cycle detecting garbage collector.
Functions are first class values. Closures are supported, and decorators are syntactic sugar for higher order functions applied at definition time. Classes use a multiple inheritance model with a method resolution order based on C3 linearization, the same algorithm used by Dylan. Iteration is built around the iterator protocol; generators (introduced in 2.2) and generator expressions (2.4) provide lazy sequence construction. Async I/O is built on coroutines and event loops; the async and await keywords were added in 3.5 through PEP 492 by Yury Selivanov.
Duck typing is the conventional design discipline: code is written against the methods an object responds to rather than its declared type. The colloquial summary is "if it walks like a duck and quacks like a duck, it is a duck." This makes Python code highly composable but also means that whole categories of bugs only surface at runtime.
The interactive REPL is a core part of the experience. The standard prompt has been usable since 1991, and Python 3.13 replaced it with a far more capable interpreter borrowed from PyPy that supports multiline editing, syntax highlighting, history search, and paste mode.
Python acquired optional type annotations in two stages. PEP 3107 (Python 3.0, 2008) added annotation syntax to function parameters and return values without giving them any defined meaning. PEP 484, written by Guido van Rossum, Jukka Lehtosalo, and Lukasz Langa and accepted into Python 3.5 in 2015, gave those annotations a standard meaning compatible with offline type checkers. The reference checker, mypy, was started by Lehtosalo as a PhD project at Cambridge before he joined Dropbox, where van Rossum worked on type hints during his time there from 2013 to 2019.
Further PEPs filled in the type system: PEP 526 (variable annotations, 3.6), PEP 544 (Protocol classes for structural subtyping, 3.8), PEP 585 (built in generics like list[int] without typing.List, 3.9), PEP 604 (X | Y union syntax, 3.10), PEP 612 (ParamSpec for higher order generics, 3.10), PEP 646 (variadic generics, 3.11), PEP 673 (Self type, 3.11), PEP 695 (new generic syntax with class Foo[T]:, 3.12), and PEP 749 (deferred evaluation of annotations, 3.14). Today Python's type system is roughly comparable in expressive power to TypeScript's, though it remains optional and has no runtime enforcement.
Alternative type checkers include pyright (Microsoft), pyre (originally Meta), and the newer pytype (Google) and ty (Astral). Static typing is now common in production codebases and is a hard requirement in many large open source projects, including pandas, FastAPI, and the standard library stubs in the typeshed repository.
CPython, written in C and Python, is the reference implementation and the one most users mean when they say "Python." It is what the python.org installers ship and what every operating system distribution packages. Several alternative implementations exist for specific use cases.
| Implementation | Host | Initial release | Notes |
|---|---|---|---|
| CPython | C | 1994 | Reference implementation, default everywhere |
| PyPy | RPython | 2007 | Tracing JIT, often 4 to 10 times faster than CPython on long running pure Python code |
| Jython | JVM (Java) | 2001 | Compiles Python to Java bytecode; integrates with Java libraries |
| IronPython | .NET CLR | 2006 | Targets the Common Language Runtime; mostly maintained by community after Microsoft handoff |
| MicroPython | C, bare metal | 2014 | Subset of Python for microcontrollers; runs on Pyboard, ESP32, RP2040 |
| CircuitPython | C, bare metal | 2017 | Adafruit fork of MicroPython with friendlier hardware APIs |
| GraalPy | GraalVM | 2021 | Oracle's Truffle/Graal based implementation, can call into Java |
| RustPython | Rust | 2018 | Pure Rust interpreter, can compile to WebAssembly |
CPython, PyPy, and MicroPython are the three implementations with meaningful production usage today. Jython and IronPython lag behind the language version supported by CPython by several major releases.
CPython has historically been slow compared to compiled languages because each bytecode instruction is dispatched through a large switch statement and every operation has to go through generic object protocols. Three projects have changed that picture in the 2020s.
The Faster CPython project, announced in 2020 and funded mainly by Microsoft, brought van Rossum and Mark Shannon together to incrementally rewrite the interpreter. The first deliverable, in Python 3.11, was a specializing adaptive interpreter (PEP 659) that watches the types flowing through hot bytecode and rewrites individual instructions to type specialized fast paths. Frame creation was made lazy and Python to Python calls were inlined. The reported geometric mean speedup over 3.10 was about 25 percent, with some workloads (recursive functions, attribute access heavy code) seeing more.
PEP 703, accepted in October 2023, made the Global Interpreter Lock optional. Sam Gross's nogil fork of CPython demonstrated that with biased reference counting, immortal objects, per object locking, and a stop the world cycle collector, the interpreter could run threads in parallel without unacceptable single threaded slowdown. Python 3.13 shipped the first official python3.13t free threaded build as experimental. Python 3.14, through PEP 779, declared free threading a tier one supported configuration with the single threaded penalty reduced to about 5 to 10 percent. The GIL is not gone (the default build still has it) but it is now possible to build a CPython where every thread runs Python bytecode in parallel on a separate core, which matters most for CPU bound workloads in scientific Python and for serving inference requests in process.
PEP 744, also targeting 3.13, added an experimental copy and patch JIT compiler authored by Brandt Bucher and Savannah Ostrowski. The technique compiles short bytecode sequences ("micro ops") into native code by stitching together prebuilt machine code templates. The JIT remains opt in (--enable-experimental-jit) and the steering council has set a 5 percent geometric mean improvement as the bar for promotion to non experimental status.
Python ships with a large standard library, often summarized as "batteries included." Notable modules include os and pathlib for filesystem access, subprocess for invoking other programs, socket and asyncio for networking, http.server, http.client, and urllib for HTTP, json and tomllib (added in 3.11) for serialization, sqlite3 for an embedded SQL database, unittest for testing, argparse for command line interfaces, dataclasses (added in 3.7) for data carrier classes, functools and itertools for functional helpers, and concurrent.futures, threading, multiprocessing, and the new concurrent.interpreters (3.14) for parallelism. The typing module holds the type system primitives, re provides regular expressions, and collections exposes specialized containers like deque, Counter, and defaultdict.
Dead modules are removed periodically. PEP 594, executed in Python 3.13, dropped 19 "dead batteries" including aifc, audioop, cgi, crypt, imghdr, mailcap, nntplib, pipes, sndhdr, and telnetlib. The 2to3 migration tool was also retired in 3.13.
Python packaging has a complicated history because it grew up incrementally rather than being designed centrally. The pieces that matter today are:
pip, the package installer, was created by Ian Bicking on October 28, 2008 as a successor to easy_install. The Python Packaging Authority (PyPA) took over maintenance in 2011. pip ships with CPython since version 3.4 (PEP 453).
PyPI, the Python Package Index, is the public repository pip downloads from. As of mid 2025, PyPI hosts more than 600,000 distinct packages and serves billions of downloads per month, making it one of the largest software registries in existence.
Virtual environments isolate per project dependencies. The original virtualenv was again Bicking's work; the venv module was added to the standard library in 3.3 (2012) through PEP 405.
Project metadata moved through several formats. setuptools and the setup.py script were the de facto standard for years. PEP 517 and PEP 518 (2015 and 2016) defined a build system independent format using pyproject.toml. PEP 621 (2020) standardized how project metadata (name, version, dependencies) goes into that same file. Today most new Python projects use pyproject.toml exclusively.
Competing higher level tools layer on top of pip and PyPI: Poetry (started 2018) emphasizes dependency resolution and lockfiles; Hatch and PDM aim for full PEP 621 compliance; uv (released 2024 by Astral, the company behind the Ruff linter) is a Rust based pip and virtualenv replacement that is roughly an order of magnitude faster for typical install workloads. Anaconda's conda is a separate package manager popular in scientific computing because it can also install non Python binaries (CUDA, BLAS, GDAL) without compiling from source.
Python became the default language for AI and machine learning over a roughly 15 year period beginning in the mid 2000s. Several factors compounded.
First, NumPy, released by Travis Oliphant in 2006 by merging the older Numeric (1995) and Numarray packages, gave Python a single canonical multidimensional array type with vectorized operations dispatched into C and Fortran. SciPy, started in 2001 by Oliphant, Pearu Peterson, and Eric Jones, layered linear algebra, optimization, signal processing, and statistics on top. Pandas, written by Wes McKinney starting in 2008 at AQR Capital and open sourced in 2009, introduced the DataFrame to Python and made tabular data manipulation comparable to R and SAS. Matplotlib, started by John Hunter in 2003, gave the stack a plotting library. By around 2012 this combination was the de facto data analysis platform in academia.
Second, Python is a glue language. The performance critical kernels in NumPy and PyTorch are not Python; they are C, C++, Fortran, and CUDA. Python is the orchestration layer that calls into them. This pattern, sometimes called the "two language problem," is also the reason that the interpreter's slowness has historically not been a blocker for scientific work: the heavy math runs outside Python.
Third, the Jupyter notebook (released 2011, originally as IPython Notebook by Fernando Perez) gave researchers an interactive document format that mixed prose, code, and inline plots. Jupyter is now standard for ML experimentation, course materials, and reproducible research. By January 2021 there were close to 10 million Jupyter notebooks on GitHub.
Fourth, the major deep learning frameworks chose Python as their primary user interface. scikit-learn, started in 2007 by David Cournapeau as a Google Summer of Code project and developed at INRIA, became the standard library for classical machine learning (linear models, SVMs, random forests, gradient boosting, clustering). Theano, from MILA in Montreal (2007), pioneered automatic differentiation on GPUs in Python. TensorFlow, open sourced by Google in November 2015, brought the same idea to a much larger industrial audience. PyTorch, released by Facebook (now Meta) in September 2016 and built on the older Lua based Torch7, displaced TensorFlow in research over the following five years because of its define by run autograd and Python native API; it is now governed by the PyTorch Foundation under the Linux Foundation. JAX, introduced by Google researchers in 2018, combined NumPy's API with XLA compilation, automatic differentiation, and pmap based parallelism, and is widely used at DeepMind, Anthropic, and other research labs.
Hugging Face, founded in 2016 in New York by Clement Delangue, Julien Chaumond, and Thomas Wolf, released the Transformers library in late 2018 (originally pytorch-pretrained-bert). It became the canonical way to download and run pretrained transformer models. The Hugging Face Hub now hosts over a million models and datasets. The library exposes a uniform API across PyTorch, TensorFlow, and JAX backends.
More recent Python tooling targets large language model applications specifically. LangChain, released by Harrison Chase in October 2022, became one of the most popular frameworks for building LLM powered applications, particularly retrieval augmented generation pipelines. LlamaIndex, started by Jerry Liu in late 2022, focuses on data ingestion and indexing for LLM context. vLLM, released by UC Berkeley researchers in 2023, is a high throughput LLM inference engine built on top of PyTorch that uses paged attention to serve many concurrent requests efficiently. NVIDIA's Triton Inference Server, OpenAI's Triton GPU programming language, Anthropic's open source anthropic SDK, and the OpenAI Python SDK are all written in or for Python.
| Library | First release | Primary maintainer | Purpose |
|---|---|---|---|
| NumPy | 2006 | NumFOCUS, community | N dimensional arrays and vectorized math |
| SciPy | 2001 | NumFOCUS, community | Scientific algorithms on top of NumPy |
| pandas | 2008 | NumFOCUS, community | DataFrames and time series |
| Matplotlib | 2003 | NumFOCUS, community | 2D plotting |
| scikit-learn | 2010 | INRIA, community | Classical machine learning |
| TensorFlow | 2015 | Deep learning framework | |
| Keras | 2015 | Originally Francois Chollet, now Google | High level neural network API, ships in TensorFlow |
| PyTorch | 2016 | PyTorch Foundation (Linux Foundation) | Deep learning framework |
| JAX | 2018 | Differentiable NumPy with XLA compilation | |
| Transformers | 2018 | Hugging Face | Pretrained transformer models |
| LangChain | 2022 | LangChain Inc. | LLM application framework |
| LlamaIndex | 2022 | LlamaIndex Inc. | RAG and data framework for LLMs |
| vLLM | 2023 | vLLM project (originally UC Berkeley) | High throughput LLM inference |
The practical consequence is that almost every published machine learning paper since the late 2010s ships its reference implementation in Python, almost every model card on Hugging Face has a Python loading snippet, and most ML engineering job postings require Python proficiency.
Python's rise has been visible in every major language ranking. The TIOBE Programming Community Index, which estimates language popularity from search engine queries, named Python its language of the year in 2007, 2010, 2018, 2020, 2021, 2022, and 2024. Python first reached the number one TIOBE position in 2021, displacing C, and in 2025 it set new records: a 25.35 percent share in May 2025 and a peak of 26.98 percent in July 2025, the highest TIOBE rating any language had recorded since Java's peak in 2001. As of October 2025 it remained the top ranked language with a wide margin over the next contenders.
The Stack Overflow Developer Survey 2024 reported that 51 percent of all professional and hobbyist developers had used Python in the past year, tied with SQL for third place behind JavaScript (62 percent) and HTML/CSS (53 percent). Python was also the most desired language in the same survey, meaning it had the highest share of respondents who did not currently use it but wanted to learn it. Octoverse, GitHub's annual report on activity across the platform, reported in 2024 that Python had overtaken JavaScript as the most used language on GitHub, ending a decade of JavaScript dominance. Much of that shift came from new contributors writing data and AI code.
The JetBrains Python Developers Survey, conducted with the PSF, reports that data analysis, web development, and machine learning are the three most common use cases, with data analysis surpassing web development for the first time in 2021.
From 1991 until 2018 Python was governed informally by van Rossum, who held the title of Benevolent Dictator for Life. He had final authority on language design questions. The structure worked for nearly three decades but began to strain. The trigger for change was PEP 572 (assignment expressions, the walrus operator), which generated months of acrimonious debate on python-ideas. Van Rossum approved the PEP, then on July 12, 2018 announced that he was "permanent vacation from being BDFL" and stepping back from decision making.
The community drafted PEP 8016 and elected the first Python Steering Council in early 2019. The council has five seats and is elected annually by Python core developers. Members have included van Rossum himself, Brett Cannon, Pablo Galindo Salgado, Thomas Wouters, Carol Willing, Barry Warsaw, Emily Morehouse, Gregory P. Smith, and Lukasz Langa, in various combinations. The PSF, founded as a Delaware nonprofit on March 6, 2001, holds the trademarks and copyrights and runs PyCon, the annual North American conference, plus regional events.
Van Rossum joined Microsoft as a Distinguished Engineer in November 2020 after retiring briefly from Dropbox. He continued to work on Python performance through the Faster CPython team.
The most enduring complaint is the Global Interpreter Lock. The GIL is a mutex inside CPython that allows only one thread to execute Python bytecode at a time. It simplifies memory management and the C API, but it means a Python program cannot use multiple cores for CPU bound work without resorting to multiprocessing or rewriting hot loops in C, Cython, or Rust. Workarounds have existed for decades; PEP 703's free threaded build is the first time the project has committed to actually removing the lock, and even then the change is opt in and incremental.
Raw single threaded performance is also slower than statically compiled languages by roughly an order of magnitude. The Faster CPython project has narrowed the gap, but Python is still considerably slower than C, Go, Rust, or modern JavaScript engines. The conventional response is that Python's value is in development speed and that the libraries it calls into are written in faster languages anyway.
Packaging fragmentation is a recurring complaint. The transition from setup.py to pyproject.toml took years; multiple competing high level tools (pip, Poetry, Hatch, PDM, uv, conda) cover overlapping ground; and dependency resolution between them is not always reliable. The introduction of uv in 2024 has consolidated some of this around a single fast tool, but the ecosystem still surprises new users.
The Python 2 to Python 3 transition is now complete but it is widely cited as a cautionary tale in language design about how disruptive a backwards incompatible cleanup release can be, even when the cleanup is well motivated. Many projects spent years maintaining compatibility shims (six, future) before they could finally drop Python 2.