Python (programming language): Difference between revisions

Content deleted Content added
Implementations: i add python main details for help to learn
Tags: Reverted possible conflict of interest Visual edit
Types of use: not {{main}}, but {{further}} fits
 
Line 1:
{{Short description|General-purpose, high-level programming language}}
{{Use dmy dates|date=AugustNovember 20202021}}
{{Use American English|date=December 2024}}
{{Other uses|Python (disambiguation)}}
{{Infobox programming language
| logo = Python -logo and wordmark-notext.svg
| logo size = 250px150px
| paradigm = [[Multi-paradigm programming language|Multi-paradigm]]: [[objectObject-oriented programming|object-oriented]],<ref>{{Cite web|title=General Python FAQ Python 3.9.2 documentation|url=https://docs.python.org/3/faq/general.html#what-is-python|access-date=20212024-0307-2807|website=docs.python.org|archive-date=24 October 2012|archive-url=https://web.archive.org/web/20121024164224/http://docs.python.org/faq/general.html#what-is-python|url-status=live}}</ref> [[proceduralProcedural programming|procedural]] ([[imperativeImperative programming|imperative]]), [[functionalFunctional programming|functional]], [[structuredStructured programming|structured]], [[reflectiveReflective programming|reflective]]
| released = {{start date and age|1991|02|20|df=y}}<ref name="alt-sources-history">{{cite web |url=https://www.tuhs.org/Usenet/alt.sources/1991-February/001749.html |title=Python 0.9.1 part 01/21 |publisher=alt.sources archives |access-date=2021-08-11 |archive-date=11 August 2021 |archive-url=https://web.archive.org/web/20210811171015/https://www.tuhs.org/Usenet/alt.sources/1991-February/001749.html |url-status=live }}</ref>
| designer = [[Guido van Rossum]]
| developer = [[Python Software Foundation]]
| latest release version = {{wikidata|property|edit|reference|P548=Q2804309|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|single|P548=Q2804309|P348|P577}}}}
| latest preview version = 3.14.0rc2 <!-- {{wikidata|property|edit|reference|P548=Q51930650|P348}} doesn't work, nor what AI suggested as fix: {{#invoke:Wikidata | claim | P348 | qualifier = P548:Q51930650 | rank = best }} -->
| latest preview date = {{start date and age|2025|08|14|df=y}} <!-- {{start date and age|{{wikidata|qualifier|singleQ28865 |P548=Q51930650|P348|P577}}}} nor
{{#invoke:Wikidata | qualifier | P348 | P577 | qualifier = P548:Q51930650 | rank = best | formatting = date }}
| typing = [[duck typing|Duck]], [[dynamic typing|dynamic]], [[strong and weak typing|strong typing]];<ref>{{Cite web|title=Why is Python a dynamic language and also a strongly typed language - Python Wiki|url=https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language|access-date=2021-01-27|website=wiki.python.org|archive-date=14 March 2021|archive-url=https://web.archive.org/web/20210314173706/https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language|url-status=live}}</ref> [[gradual typing|gradual]] (since 3.5, but ignored in [[CPython]])<ref>{{cite web|url=https://www.python.org/dev/peps/pep-0483/|title=PEP 483 -- The Theory of Type Hints|website=Python.org|access-date=14 June 2018|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614153558/https://www.python.org/dev/peps/pep-0483/|url-status=live}}</ref>
-->
| implementations = [[CPython]], [[PyPy]], [[Stackless Python]], [[MicroPython]], [[CircuitPython]], [[IronPython]], [[Jython]]
| typing = [[Duck typing|duck]], [[Dynamic typing|dynamic]], [[Strong and weak typing|strong]];<ref>{{Cite web|title=Why is Python a dynamic language and also a strongly typed language |url=https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language|access-date=2021-01-27|website=Python Wiki |archive-date=14 March 2021|archive-url=https://web.archive.org/web/20210314173706/https://wiki.python.org/moin/Why%20is%20Python%20a%20dynamic%20language%20and%20also%20a%20strongly%20typed%20language|url-status=live}}</ref> [[Optional typing|optional type annotations]]{{efn|since 3.5, but those hints are ignored, except with unofficial tools<ref name="type_hint-PEP">{{cite web|url=https://www.python.org/dev/peps/pep-0483/|title=PEP 483 – The Theory of Type Hints|website=Python.org|access-date=14 June 2018|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614153558/https://www.python.org/dev/peps/pep-0483/|url-status=live}}</ref>}}
| dialects = [[Cython]], [[PyPy#RPython|RPython]], [[Bazel (software)|Starlark]]<ref>{{cite web|title=Starlark Language|url=https://docs.bazel.build/versions/master/skylark/language.html|access-date=25 May 2019|archive-date=15 June 2020|archive-url=https://web.archive.org/web/20200615140534/https://docs.bazel.build/versions/master/skylark/language.html|url-status=live}}</ref>
| implementations = [[CPython]], [[PyPy]], [[MicroPython]], [[CircuitPython]], [[IronPython]], [[Jython]], [[Stackless Python]]
| influenced = [[Apache Groovy]], [[Boo (programming language)|Boo]], [[Cobra (programming language)|Cobra]], [[CoffeeScript]],<ref>{{Cite web|url=https://coffeescript.org/|title=CoffeeScript|website=coffeescript.org|access-date=3 July 2018|archive-date=12 June 2020|archive-url=https://web.archive.org/web/20200612100004/http://coffeescript.org/|url-status=live}}</ref> [[D (programming language)|D]], [[F Sharp (programming language)|F#]], [[Genie (programming language)|Genie]],<ref>{{cite web
| operating system = [[Cross-platform]]{{efn|
|url=https://wiki.gnome.org/action/show/Projects/Genie
*'''Tier 1''': 64-bit [[Linux]], [[macOS]]; 64- and 32-bit [[Windows]] 10+<ref>{{Cite web |title=PEP 11 – CPython platform support {{!}} peps.python.org |url=https://peps.python.org/pep-0011/ |access-date=2024-04-22 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref><!-- Not "Windows for IoT and embedded systems"; NOT UNIX, it's not listed, nor any Unix-like, maybe implied Possibly Windows 8.1 is also supported on at least Python 3.9? Might also work on latest, seems too minor to mention, for any Python version. Windows 7 and 8 are prevented to work on Python 3.9, though it might not rule out 8.1, also some info like this might be a bit wrong:
|title=The Genie Programming Language Tutorial
 
|access-date=28 February 2020
"Windows 8 and newer for Python 3.9
|archive-date=1 June 2020
FreeBSD 10 and newer
|archive-url=https://web.archive.org/web/20200601133216/https://wiki.gnome.org/action/show/Projects/Genie
macOS Snow Leopard (macOS 10.6, 2008) and newer"
|url-status=live
-->
}}</ref> [[Go (programming language)|Go]], [[JavaScript]],<ref>{{cite web
*'''Tier 2''': E.g. 32-bit [[WebAssembly]] (WASI) <!-- (WASI SDK, Wasmtime) meaning wasm32-unknown-wasi; wasm32-unknown-emscripten is unsupported since 3.13. aarch64-pc-windows-msvc and powerpc64le-unknown-linux-gnu -->
|title=Perl and Python influences in JavaScript
*'''Tier 3''': 64-bit [[Android (operating system)|Android]]<!-- too much trivia to mention "5.0+", even if true, it seemingly is, and corresponding API levels, but thouse are ancient, possibly even only way more recent is officially supported? -->,<ref>{{Cite web |title=PEP 738 – Adding Android as a supported platform {{!}} peps.python.org |url=https://peps.python.org/pep-0738/ |access-date=2024-05-19 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref> [[iOS]], [[FreeBSD]], and (32-bit) [[Raspberry Pi OS]]<br />Unofficial (or has been known to work): Other [[Unix-like]]/[[BSD]] variants) and a few other platforms<!-- Used to support many more, only few support latest 3.9+ --><ref>{{Cite web |title=Download Python for Other Platforms |url=https://www.python.org/download/other/ |access-date=2023-08-18 |website=Python.org |language=en |archive-date=27 November 2020 |archive-url=https://web.archive.org/web/20201127015815/https://www.python.org/download/other/ |url-status=live}}</ref><ref>{{Cite web |title=test – Regression tests package for Python – Python 3.7.13 documentation |url=https://docs.python.org/3.7/library/test.html?highlight=android#test.support.is_android |access-date=2022-05-17 |website=docs.python.org |archive-date=17 May 2022 |archive-url=https://web.archive.org/web/20220517151240/https://docs.python.org/3.7/library/test.html?highlight=android#test.support.is_android |url-status=live}}</ref><ref>{{Cite web |title=platform – Access to underlying platform's identifying data – Python 3.10.4 documentation |url=https://docs.python.org/3/library/platform.html?highlight=android |access-date=2022-05-17 |website=docs.python.org |archive-date=17 May 2022 |archive-url=https://web.archive.org/web/20220517150826/https://docs.python.org/3/library/platform.html?highlight=android |url-status=live}}</ref>}}
|date=24 February 2013
 
|website=www.2ality.com
<!--
|url=http://www.2ality.com/2013/02/javascript-influences.html
https://mail.python.org/archives/list/python-committers@python.org/thread/K757345KX6W5ZLTWYBUXOXQTJJTL7GW5/
|access-date=15 May 2015
 
|archive-date=26 December 2018
* Alpine / musl is not supported, because our test suite is failing due to bugs and missing features in musl libc.
|archive-url=https://web.archive.org/web/20181226141121/http://2ality.com/2013/02/javascript-influences.html%0A
* NetBSD and OpenBSD are in a similar state as Alpine: no stable buildbot and AFAIK tests are failing
|url-status=live
* [outdated]
}}</ref><ref>{{cite web
* Cygwin and MinGW are officially unsupported, see bpo-45537 and bpo-45538
|title=Chapter 3: The Nature of JavaScript; Influences
 
|last=Rauschmayer
..
|first=Axel
 
|website=O'Reilly, Speaking JavaScript
The policy Brett is proposing just makes that explicit and gives us something to point to when someone comes up with a patch to support PDP-11 or when someone's patch for Android breaks Windows. I don't think we'll wind up with tier support police; if a core dev wants to take responsibility for a patch for a platform that is not tier 3 or above they can still do that, but if it breaks things for a supported platform it will be reverted.
|url=http://speakingjs.com/es5/ch03.html
 
|access-date=15 May 2015
..
|archive-date=26 December 2018
 
|archive-url=https://web.archive.org/web/20181226141123/http://speakingjs.com/es5/ch03.html%0A
E.g. Android support was even funded by the PSF recently. [outdated]
|url-status=live
Also note that the stdlib does in fact support other Python implementations reusing (parts of) it, e.g. Jython, PyPy and IronPython. Again, without core devs backing these.
}}</ref> [[Julia (programming language)|Julia]],<ref name=Julia/> [[Nim (programming language)|Nim]], Ring,<ref name="The Ring programming language and other languages">{{cite web |url=http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |title=Ring and other languages |author=Ring Team |date=4 December 2017 |work=ring-lang.net |publisher=[[ring-lang]] |access-date=4 December 2017 |archive-date=25 December 2018 |archive-url=https://web.archive.org/web/20181225175312/http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |url-status=live }}</ref> [[Ruby (programming language)|Ruby]],<ref name="bini"/> [[Swift (programming language)|Swift]]<ref name="lattner2014">{{cite web |url=http://nondot.org/sabre/ |title=Chris Lattner's Homepage |last=Lattner |first=Chris |date=3 June 2014 |access-date=3 June 2014 |publisher=Chris Lattner |quote=The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. |archive-date=25 December 2018 |archive-url=https://web.archive.org/web/20181225175312/http://nondot.org/sabre/ |url-status=live }}</ref>
-->| license = [[Python Software Foundation License]]
| file ext = .py, .pyw, .pyz,<!-- Too much trivia?: (since 3.5), since 3.8 latest supported and Python 3.5.10 Sept. 5, 2020--><ref>{{cite web |url=https://www.python.org/dev/peps/pep-0441/ |last=Holth |first=Moore |date=30 March 2014 |access-date=12 November 2015 |title=PEP 0441 – Improving Python ZIP Application Support |archive-date=26 December 2018 |archive-url=https://web.archive.org/web/20181226141117/https://www.python.org/dev/peps/pep-0441/%20 |url-status=live}}</ref><br />
| website = {{URL|https://www.python.org/}}
.pyi, .pyc, .pyd<!-- too much trivia: .pyo (before 3.5)<ref>File extension .pyo was removed in Python 3.5. See [https://www.python.org/dev/peps/pep-0488/ PEP 0488] {{Webarchive|url=https://web.archive.org/web/20200601133202/https://www.python.org/dev/peps/pep-0488/ |date=1 June 2020}}</ref> -->
| wikibooks = Python Programming
| website = {{URL|https://www.python.org/|python.org}}
| influenced_by = [[ABC (programming language)|ABC]],<ref name="faq-created"/> [[Ada (programming language)|Ada]],<ref>{{cite web | url=http://archive.adaic.com/standards/83lrm/html/lrm-11-03.html#11.3 | title=Ada 83 Reference Manual (raise statement) | access-date=7 January 2020 | archive-date=22 October 2019 | archive-url=https://web.archive.org/web/20191022155758/http://archive.adaic.com/standards/83lrm/html/lrm-11-03.html#11.3 | url-status=live }}</ref> [[ALGOL 68]],<ref name="98-interview"/> [[APL (programming language)|APL]],<ref name="python.org">{{cite web|url=https://docs.python.org/3/library/itertools.html|title=itertools — Functions creating iterators for efficient looping — Python 3.7.1 documentation|website=docs.python.org|access-date=22 November 2016|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614153629/https://docs.python.org/3/library/itertools.html|url-status=live}}</ref> [[C (programming language)|C]],<ref name="AutoNT-1"/> [[C++]],<ref name="classmix"/> [[CLU (programming language)|CLU]],<ref name="effbot-call-by-object"/> [[Dylan (programming language)|Dylan]],<ref name="AutoNT-2"/> [[Haskell (programming language)|Haskell]],<ref name="AutoNT-3"/> [[Icon (programming language)|Icon]],<ref name="AutoNT-4"/> [[Java (programming language)|Java]],<ref name="AutoNT-5"/> [[Lisp (programming language)|Lisp]],<ref name="AutoNT-6"/> [[Modula-3]],<ref name="classmix" /> [[Perl]], [[Standard ML]]<ref name="python.org"/>
| operating systemdialects = [[WindowsCython]], [[Linux|Linux/UNIXRPython]], [[macOSBazel (software)|Starlark]] and more<ref>{{cite web|title=DownloadStarlark PythonLanguage|url=https://wwwdocs.pythonbazel.orgbuild/downloadsversions/master/skylark/language.html|access-date=2021-05-24|website=Python.org|language=en25 May 2019|archive-date=815 AugustJune 20182020|archive-url=https://web.archive.org/web/2018080803542120200615140534/https://wwwdocs.pythonbazel.orgbuild/downloadsversions/master/skylark/language.html|url-status=live}}</ref>
| influenced by = [[ABC (programming language)|ABC]],<ref name="faq-created"/> [[Ada (programming language)|Ada]],<ref>{{cite web |url=https://archive.adaic.com/standards/83lrm/html/lrm-11-03.html#11.3 |title=Ada 83 Reference Manual (raise statement) |access-date=7 January 2020 |archive-date=22 October 2019 |archive-url=https://web.archive.org/web/20191022155758/http://archive.adaic.com/standards/83lrm/html/lrm-11-03.html#11.3 |url-status=dead}}</ref>{{failed verification|date=August 2025|reason=The source does not talk about Python. The "raise" keyword it describes is very similar to the Python version, but this is original research (see WP:OR).}} [[ALGOL 68]],<ref name="98-interview"/> <br />[[APL (programming language)|APL]],<ref name="python.org">{{cite web|url=https://docs.python.org/3/library/itertools.html|title=itertools – Functions creating iterators for efficient looping – Python 3.7.1 documentation|website=docs.python.org|access-date=22 November 2016|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614153629/https://docs.python.org/3/library/itertools.html |quote=This module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML. |url-status=live}}</ref> [[C (programming language)|C]],<ref name="AutoNT-1"/> [[C++]],<ref name="classmix"/> [[CLU (programming language)|CLU]],<ref name="effbot-call-by-object"/> [[Dylan (programming language)|Dylan]],<ref name="AutoNT-2"/> <br />[[Haskell]],<ref name="AutoNT-3"/><ref name="python.org"/> [[Icon (programming language)|Icon]],<ref name="AutoNT-4"/> [[Lisp (programming language)|Lisp]],<ref name="AutoNT-6"/> {{nowrap|<br />[[Modula-3]]}},{{r|98-interview}}<ref name="classmix"/> [[Perl]],<ref>{{cite web |title=re – Regular expression operations – Python 3.10.6 documentation |url=https://docs.python.org/3/library/re.html |website=docs.python.org |access-date=2022-09-06 |quote=This module provides regular expression matching operations similar to those found in Perl. |archive-date=18 July 2018 |archive-url=https://web.archive.org/web/20180718132241/https://docs.python.org/3/library/re.html |url-status=live}}</ref> [[Standard ML]]<ref name="python.org"/>
<!-- not put in as also Java implementation (Jython): | programming language = [[C (programming language)|C]] -->| file ext = .py, .pyi, .pyc, .pyd, .pyo (prior to 3.5),<ref>File extension .pyo was removed in Python 3.5. See [https://www.python.org/dev/peps/pep-0488/ PEP 0488] {{Webarchive|url=https://web.archive.org/web/20200601133202/https://www.python.org/dev/peps/pep-0488/ |date=1 June 2020 }}</ref> {{notatypo|.pyw}}, .pyz (since 3.5)<ref>{{cite web |url=https://www.python.org/dev/peps/pep-0441/ |last=Holth |first=Moore |date=30 March 2014 |access-date=12 November 2015 |title=PEP 0441 -- Improving Python ZIP Application Support |archive-date=26 December 2018 |archive-url=https://web.archive.org/web/20181226141117/https://www.python.org/dev/peps/pep-0441/%20 |url-status=live }}</ref>
| influenced = [[Apache Groovy]], [[Boo (programming language)|Boo]], [[Cobra (programming language)|Cobra]], [[CoffeeScript]],<ref>{{Cite web|url=https://coffeescript.org/|title=CoffeeScript|website=coffeescript.org|access-date=3 July 2018|archive-date=12 June 2020|archive-url=https://web.archive.org/web/20200612100004/http://coffeescript.org/|url-status=live}}</ref> [[D (programming language)|D]], [[F Sharp (programming language)|F#]], [[GDScript]], [[Go (programming language)|Go]], [[JavaScript]],<ref>{{cite web
|title=Perl and Python influences in JavaScript
|date=24 February 2013
|website=www.2ality.com
|url=https://www.2ality.com/2013/02/javascript-influences.html
|access-date=15 May 2015
|archive-date=26 December 2018
|archive-url=https://web.archive.org/web/20181226141121/http://2ality.com/2013/02/javascript-influences.html%0A
|url-status=live
}}</ref><ref>{{cite web
|title=Chapter 3: The Nature of JavaScript; Influences
|last=Rauschmayer
|first=Axel
|website=O'Reilly, Speaking JavaScript
|url=https://speakingjs.com/es5/ch03.html
|access-date=15 May 2015
|archive-date=26 December 2018
|archive-url=https://web.archive.org/web/20181226141123/http://speakingjs.com/es5/ch03.html%0A
|url-status=live
}}</ref> [[Julia (programming language)|Julia]],<ref name=Julia/> [[Mojo (programming language)|Mojo]],<ref name="Mojo">{{Cite web |last=Krill |first=Paul |date=2023-05-04 |title=Mojo language marries Python and MLIR for AI development |url=https://www.infoworld.com/article/3695588/mojo-language-marries-python-and-mlir-for-ai-development.html |access-date=2023-05-05 |website=InfoWorld |language=en |archive-date=5 May 2023 |archive-url=https://web.archive.org/web/20230505064554/https://www.infoworld.com/article/3695588/mojo-language-marries-python-and-mlir-for-ai-development.html |url-status=live}}</ref> [[Nim (programming language)|Nim]], [[Ring (programming language)|Ring]],<ref name="The Ring programming language and other languages">{{cite web |url=https://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |title=Ring and other languages |author=Ring Team |date=4 December 2017 |work=ring-lang.net |publisher=[[ring-lang]] |access-date=4 December 2017 |archive-date=25 December 2018 |archive-url=https://web.archive.org/web/20181225175312/http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |url-status=live}}</ref> [[Ruby (programming language)|Ruby]],<ref name="bini"/> [[Swift (programming language)|Swift]],<ref name="lattner2014">{{Cite web |url=http://nondot.org/sabre/ |title=Chris Lattner's Homepage |last=Lattner |first=Chris |date=3 June 2014 |access-date=3 June 2014 |publisher=Chris Lattner |quote=The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. |archive-date=25 December 2018 |archive-url=https://web.archive.org/web/20181225175312/http://nondot.org/sabre/ |url-status=live}}</ref> [[V (programming language)|V]]<ref name="vpeople">{{Cite web |title=V documentation (Introduction) |url=https://github.com/vlang/v/blob/master/doc/docs.md#introduction |access-date=2024-12-24|website=GitHub |language=en}}</ref>
<!-- Do not put in as there's also a pure Java implementation (Jython): | programming language = [[C (programming language)|C]] -->| wikibooks = Python Programming
}}
 
'''Python''' is an [[interpreted language|interpreted]]a [[high-level programming language|high-level]], [[general-purpose programming language]]. Its design philosophy emphasizes [[code readability]] with itsthe use of [[Off-side rule|significant indentation]]. Its [[language construct]]s as well as its [[object-oriented programming|object-oriented]] approach aim to help [[programmers]] write clear, logical code for small and large-scale projects.<ref name="AutoNT-7" />
 
Python is [[Type_systemtype system#DYNAMIC|dynamically type-typedchecked]] and [[garbage collection (computer science)|garbage-collected]]. It supports multiple [[programming paradigm]]s, including [[structured programming|structured]] (particularly, [[procedural programming|procedural]]), [[Object-oriented programming|object-oriented]] and [[functional programming]]. It is often described as a "batteries included" language due to its comprehensive [[standard library]].<ref name="About" />
 
[[Guido van Rossum]] began working on Python in the late 1980s as a successor to the [[ABC (programming language)|ABC]] programming language. Python&nbsp;3.0, released in 2008, was a major revision not completely [[backward-compatible]] with earlier versions. Recent versions, such as Python 3.12, have added capabilites and keywords for typing (and more; e.g. increasing speed); helping with (optional) [[static typing]].<ref>{{Cite web |title=mypy - Optional Static Typing for Python |url=https://mypy-lang.org/ |access-date=2025-08-17 |website=mypy-lang.org}}</ref> Currently only versions in the 3.x series are supported.
[[Guido van Rossum]] began working on Python in the late 1980s, as a successor to the [[ABC (programming language)|ABC programming language]], and first released it in 1991 as Python&nbsp;0.9.0.<ref>{{Cite web|last=Rossum|first=Guido Van|date=2009-01-20|title=The History of Python: A Brief Timeline of Python|url=https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html|access-date=2021-03-05|website=The History of Python|archive-date=5 June 2020|archive-url=https://web.archive.org/web/20200605032200/https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html|url-status=live}}</ref> Python&nbsp;2.0 was released in 2000 and introduced new features, such as [[list comprehension]]s and a garbage collection system using [[reference counting]]. Python&nbsp;3.0 was released in 2008 and was a major revision of the language that is not completely [[backward compatibility|backward-compatible]]. Python&nbsp;2 was discontinued with version&nbsp;2.7.18 in 2020.<ref>{{Cite web|url=https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html|title=Python Insider: Python 2.7.18, the last release of Python 2|last=Peterson|first=Benjamin|date=20 April 2020|website=Python Insider|access-date=27 April 2020|archive-date=26 April 2020|archive-url=https://web.archive.org/web/20200426204118/https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html|url-status=live}}</ref>
 
Python consistently ranks as one of the most popular programming languages, and it has gained widespread use in the [[machine learning]] community.<ref>{{Cite web |title=Stack Overflow Developer Survey 20202022 |url=https://insightssurvey.stackoverflow.comco/survey/20202022/ |access-date=20212022-0308-0512 |website=Stack Overflow |language=en |archive-date=227 MarchJune 2022 2021|archive-url=https://web.archive.org/web/2021030214072920220627175307/https://insightssurvey.stackoverflow.comco/survey2022/2020 |url-status=live}}</ref><ref>{{Cite web|title=The State of Developer Ecosystem in 2020 Infographic|url=https://www.jetbrains.com/lp/devecosystem-2020/|access-date=2021-03-05|website=JetBrains: Developer Tools for Professionals and Teams|language=en|archive-date=1 March 2021|archive-url=https://web.archive.org/web/20210301062411/https://www.jetbrains.com/lp/devecosystem-2020/|url-status=live}}</ref><ref name="tiobecurrent">{{Citecite web |title=indexTIOBE {{!}}Index |publisher=TIOBE - The Software Quality Company|url=https://www.tiobe.com/tiobe-index/ |access-date=2021-02-023 January 2023 |quote=Python has won theThe TIOBE programmingProgramming languageCommunity of the year award! Thisindex is foran theindicator fourth time inof the history,popularity which is a record! The title is awarded to theof programming languagelanguages that has gained most popularity in one year.|website=www.tiobe.com|archive-date=25 February 2018 |archive-url=https://web.archive.org/web/20180225101948/https://www.tiobe.com/tiobe-index/ |url-status=live}} Updated as required.</ref><ref>{{Cite webjournal |last=Healy |first=John |last2=McInnes |first2=Leland |last3=Weir |first3=Colin |date=2017 |title=PYPLBridging PopularitYthe Cyber-Analysis Gap: The Democratization of ProgrammingData LanguageScience index|url=https://pyplwww.githubjstor.ioorg/PYPLstable/26267404 |journal=The Cyber Defense Review |volume=2 |issue=1 |pages=109–118 |doi=10.html2307/26267404 |access-dateissn=20212474-03-262120 |websitequote=pypl"Python is the lingua franca of data science and machine learning.github"}}</ref> It is widely taught as an introductory programming language.io<ref>{{Cite journal |languagelast=enSultana |archive-datefirst=14Simon MarchG. |last2=Reed |first2=Philip A. |date=2017 |title=Curriculum for an Introductory Computer Science Course: Identifying Recommendations from Academia and Industry |archive-url=https://webwww.archivejstor.org/webstable/20170314232030/https://pypl.github90023144 |journal=The Journal of Technology Studies |volume=43 |issue=2 |pages=80–92 |doi=10.io2307/PYPL.html90023144 |urlissn=1071-status=live6084}}</ref>
 
==History==
[[File:Guido van Rossum OSCON 2006 cropped.png|thumb|150px|The designer of Python, [[Guido van Rossum]], at [[O'Reilly Open Source Convention|OSCON]] 2006]]
{{Main|History of Python}}
[[File:Guido van Rossum in PyConUS24.jpg|thumb|311x311px|The designer of Python, [[Guido van Rossum]], at PyCon US 2024]]
Python was conceived in the late 1980s<ref name="venners-interview-pt-1"/> by [[Guido van Rossum]] at [[Centrum Wiskunde & Informatica]] (CWI) in the [[Netherlands]] (he first released it in 1991 as Python&nbsp;0.9.0.<ref>{{Cite web|last=Rossum|first=Guido Van|date=2009-01-20|title=The History of Python: A Brief Timeline of Python|url=https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html|access-date=2021-03-05|website=The History of Python|archive-date=5 June 2020|archive-url=https://web.archive.org/web/20200605032200/https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html|url-status=live}}</ref>); it was conceived as a successor to the [[ABC (programming language)|ABC]] programming language, which was inspired by [[SETL]],<ref name="AutoNT-12"/> capable of [[exception handling]] and interfacing with the [[Amoeba (operating system)|Amoeba]] operating system.<ref name="faq-created"/> Python implementation began in December,&nbsp;1989.<ref name="timeline-of-python"/> Van Rossum assumed sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from responsibilities as Python's "[[benevolent dictator for life]]" (BDFL); this title was bestowed on him by the Python community to reflect his long-term commitment as the project's chief decision-maker.<ref name="lj-bdfl-resignation"/> (He has since come out of retirement and is self-titled "BDFL-emeritus"<!-- on his Twitter-->.) In January&nbsp;2019, active Python core developers elected a five-member Steering Council to lead the project.<ref>{{cite web |title=PEP 8100 |url=https://www.python.org/dev/peps/pep-8100/ |publisher=Python Software Foundation |access-date=4 May 2019 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604235027/https://www.python.org/dev/peps/pep-8100/ |url-status=live}}</ref><ref>{{Cite web|title=PEP 13 – Python Language Governance|url=https://www.python.org/dev/peps/pep-0013/|access-date=2021-08-25|website=Python.org|language=en|archive-date=27 May 2021|archive-url=https://web.archive.org/web/20210527000035/https://www.python.org/dev/peps/pep-0013/|url-status=live}}</ref>
 
The name ''Python'' derives from the British comedy series [[Monty Python's Flying Circus]].<ref name=":0">{{Cite book |last1=Briggs |first1=Jason R. |title=Python for kids: a playful introduction to programming |last2=Lipovača |first2=Miran |date=2013 |publisher=No Starch Press |isbn=978-1-59327-407-8 |___location=San Francisco, Calif}}</ref> (See {{section link||Naming}}.)
Python was conceived in the late 1980s<ref name="venners-interview-pt-1" /> by [[Guido van Rossum]] at [[Centrum Wiskunde & Informatica]] (CWI) in the [[Netherlands]] as a successor to [[ABC (programming language)|ABC programming language]], which was inspired by [[SETL]],<ref name="AutoNT-12" /> capable of [[exception handling]] and interfacing with the [[Amoeba (operating system)|Amoeba]] operating system.<ref name="faq-created" /> Its implementation began in December&nbsp;1989, and it added some [[Functional Programming|functional programming]] features in the January 1994 release, such as the lambda operator.<ref name="timeline-of-python" /> Van Rossum shouldered sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from his responsibilities as Python's ''[[Benevolent Dictator For Life]]'', a title the Python community bestowed upon him to reflect his long-term commitment as the project's chief decision-maker.<ref name="lj-bdfl-resignation" /> In January&nbsp;2019, active Python core developers elected a five-member "Steering Council" to lead the project.<ref>{{cite web |title=PEP 8100 |url=https://www.python.org/dev/peps/pep-8100/ |publisher=Python Software Foundation |access-date=4 May 2019 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604235027/https://www.python.org/dev/peps/pep-8100/ |url-status=live }}</ref><ref>{{Cite web|title=PEP 13 -- Python Language Governance|url=https://www.python.org/dev/peps/pep-0013/|access-date=2021-08-25|website=Python.org|language=en|archive-date=27 May 2021|archive-url=https://web.archive.org/web/20210527000035/https://www.python.org/dev/peps/pep-0013/|url-status=live}}</ref>
 
Python&nbsp;2.0 was released on 16 October 2000, with many major new features, including a [[Cycle detection|cycle-detecting]] [[garbage collection (computer science)|garbage collector]] and support for [[Unicode]].<ref name="newin-2.0" />
 
Python 2.0 was released on 16 October 2000, with many major new features such as [[list comprehension]]s, [[cycle detection|cycle-detecting]] garbage collection, [[reference counting]], and [[Unicode]] support.<ref name="newin-2.0"/> Python 2.7's [[end-of-life product|end-of-life]] was initially set for 2015, and then postponed to 2020 out of concern that a large body of existing code could not easily be forward-ported to Python&nbsp;3.<ref>{{cite web |url=https://legacy.python.org/dev/peps/pep-0373/ |title=PEP 373 – Python 2.7 Release Schedule |work=python.org |access-date=9 January 2017 |archive-date=19 May 2020 |archive-url=https://web.archive.org/web/20200519075520/https://legacy.python.org/dev/peps/pep-0373/ |url-status=live}}</ref><ref>{{cite web |url=https://www.python.org/dev/peps/pep-0466/ |title=PEP 466 – Network Security Enhancements for Python 2.7.x |work=python.org |access-date=9 January 2017 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604232833/https://www.python.org/dev/peps/pep-0466/ |url-status=live}}</ref> It no longer receives security patches or updates.<ref>{{Cite web|url=https://www.python.org/doc/sunset-python-2/|title=Sunsetting Python 2|website=Python.org|language=en|access-date=22 September 2019|archive-date=12 January 2020|archive-url=https://web.archive.org/web/20200112080903/https://www.python.org/doc/sunset-python-2/|url-status=live}}</ref><ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0373/|title=PEP 373 – Python 2.7 Release Schedule|website=Python.org|language=en|access-date=22 September 2019|archive-date=13 January 2020|archive-url=https://web.archive.org/web/20200113033257/https://www.python.org/dev/peps/pep-0373/|url-status=live}}</ref> While Python 2.7 and older versions are officially unsupported, a different unofficial Python implementation, [[PyPy]], continues to support Python 2, i.e., "2.7.18+" (plus 3.10), with the plus signifying (at least some) "[[backporting|backported]] security updates".<ref>{{Cite web |last=mattip |date=2023-12-25 |title=PyPy v7.3.14 release |url=https://www.pypy.org/posts/2023/12/pypy-v7314-release.html |access-date=2024-01-05 |website=PyPy |language=en |archive-date=5 January 2024 |archive-url=https://web.archive.org/web/20240105132820/https://www.pypy.org/posts/2023/12/pypy-v7314-release.html |url-status=live}}</ref>
Python&nbsp;3.0 was released on 3 December 2008. It was a major revision of the language that is not completely [[backward compatibility|backward-compatible]].<ref name="3.0-release" /> Many of its major features were [[backporting|backported]] to Python&nbsp;2.6.x<ref name="pep-3000" /> and 2.7.x version series. Releases of Python&nbsp;3 include the <code>2to3</code> utility, which automates the translation of Python&nbsp;2 code to Python&nbsp;3.<ref>{{Cite web|title=2to3 – Automated Python 2 to 3 code translation|url=https://docs.python.org/3/library/2to3.html|access-date=2021-02-02|website=docs.python.org|archive-date=4 June 2020|archive-url=https://web.archive.org/web/20200604232823/https://docs.python.org/3/library/2to3.html|url-status=live}}</ref>
 
Python&nbsp;3.0 was released on 3 December 2008, was a major revision not completely [[backward-compatible]] with earlier versions, with some new semantics and changed syntax. Python&nbsp;2.7.18, released in 2020, was the last release of Python&nbsp;2.<ref>{{Cite web|url=https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html|title= Python 2.7.18, the last release of Python 2|last=Peterson|first=Benjamin|date=20 April 2020|website=Python Insider|access-date=27 April 2020|archive-date=26 April 2020|archive-url=https://web.archive.org/web/20200426204118/https://pythoninsider.blogspot.com/2020/04/python-2718-last-release-of-python-2.html|url-status=live}}</ref> Several releases in the Python 3.x series have added new syntax to the language, and made a few (considered very minor) backwards-incompatible changes.
Python&nbsp;2.7's [[end-of-life (product)|end-of-life]] date was initially set at 2015 then postponed to 2020 out of concern that a large body of existing code could not easily be forward-ported to Python&nbsp;3.<ref>{{cite web |url=https://legacy.python.org/dev/peps/pep-0373/ |title=PEP 373 -- Python 2.7 Release Schedule |work=python.org |access-date=9 January 2017 |archive-date=19 May 2020 |archive-url=https://web.archive.org/web/20200519075520/https://legacy.python.org/dev/peps/pep-0373/ |url-status=live }}</ref><ref>{{cite web |url=https://www.python.org/dev/peps/pep-0466/ |title=PEP 466 -- Network Security Enhancements for Python 2.7.x |work=python.org |access-date=9 January 2017 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604232833/https://www.python.org/dev/peps/pep-0466/ |url-status=live }}</ref> No more security patches or other improvements will be released for it.<ref>{{Cite web|url=https://www.python.org/doc/sunset-python-2/|title=Sunsetting Python 2|website=Python.org|language=en|access-date=22 September 2019|archive-date=12 January 2020|archive-url=https://web.archive.org/web/20200112080903/https://www.python.org/doc/sunset-python-2/|url-status=live}}</ref><ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0373/|title=PEP 373 -- Python 2.7 Release Schedule|website=Python.org|language=en|access-date=22 September 2019|archive-date=13 January 2020|archive-url=https://web.archive.org/web/20200113033257/https://www.python.org/dev/peps/pep-0373/|url-status=live}}</ref> With Python&nbsp;2's [[end-of-life (product)|end-of-life]], only Python&nbsp;3.6.x<ref>{{Cite web|url=https://devguide.python.org/#status-of-python-branches|title=Python Developer's Guide — Python Developer's Guide|website=devguide.python.org|access-date=17 December 2019|archive-date=9 November 2020|archive-url=https://web.archive.org/web/20201109032501/https://devguide.python.org/#status-of-python-branches|url-status=live}}</ref> and later are supported.
 
{{As of|2025|08|14|since=n}}, Python 3.13 is the latest stable release and Python 3.9 is the oldest supported release.<ref>{{Cite web |title=Status of Python versions |url=https://devguide.python.org/versions/ |access-date=2025-08-05 |website=Python Developer's Guide |language=en}}</ref> Releases receive two years of full support followed by three years of security support.
Python&nbsp;3.9.2 and 3.8.8 were expedited<ref>{{Cite web|last=Langa|first=Łukasz|date=2021-02-19|title=Python Insider: Python 3.9.2 and 3.8.8 are now available|url=https://pythoninsider.blogspot.com/2021/02/python-392-and-388-are-now-available.html|access-date=2021-02-26|website=Python Insider|archive-date=25 February 2021|archive-url=https://web.archive.org/web/20210225043834/https://pythoninsider.blogspot.com/2021/02/python-392-and-388-are-now-available.html|url-status=live}}</ref> as all versions of Python (including 2.7<ref>{{Cite web|title=Red Hat Customer Portal - Access to 24x7 support and knowledge|url=https://access.redhat.com/security/cve/cve-2021-3177|access-date=2021-02-26|website=access.redhat.com|archive-date=6 March 2021|archive-url=https://web.archive.org/web/20210306183700/https://access.redhat.com/security/cve/cve-2021-3177|url-status=live}}</ref>) had security issues, leading to possible [[remote code execution]]<ref>{{Cite web|title=CVE - CVE-2021-3177|url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177|access-date=2021-02-26|website=cve.mitre.org|archive-date=27 February 2021|archive-url=https://web.archive.org/web/20210227192918/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177|url-status=live}}</ref> and [[cache poisoning|web cache poisoning]].<ref>{{Cite web|title=CVE - CVE-2021-23336|url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23336|access-date=2021-02-26|website=cve.mitre.org|archive-date=24 February 2021|archive-url=https://web.archive.org/web/20210224160700/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23336|url-status=live}}</ref>
 
==Design philosophy and features==
Python is a [[multi-paradigm programming language]]. [[Object-oriented programming]] and [[structured programming]] are fully supported, and many of itstheir features support functional programming and [[aspect-oriented programming]] (including by [[metaprogramming]]<ref name="AutoNT-13" /> and [[metaobject]]s (magic methods)).<ref name="AutoNT-14" /> Many other paradigms are supported via extensions, including [[design by contract]]<ref name="AutoNT-15" /><ref name="AutoNT-16" /> and [[logic programming]].<ref name="AutoNT-17"/> Python is often referred to as a ''[[glue language|<nowiki/>'glue language']]''<ref>{{cite web |title=Glue it all together with Python |url=https://www.python.org/doc/essays/omg-darpa-mcc-position/ |access-date=2024-09-30 |df=dmy-all |website=Python.org |language=en}}</ref> because it is purposely designed to be able to integrate components written in other languages.
 
Python uses [[dynamic typing]] and a combination of [[reference counting]] and a cycle-detecting garbage collector for [[memory management]].<ref name="Reference_counting">{{Citecite web |title=Reference counts |department=Extending and embedding the Python interpreter |website=Docs.python.org |language=en |url=https://docs.python.org/extending/extending.html#reference-counts| title=Extending and Embedding the Python Interpreter: Reference Counts| publisherurl-status=Docs.python.org|live language=en| access-date=5 June 2020| |quote=Since Python makes heavy use of <code>malloc()</code> and <code>free()}</code>, it needs a strategy to avoid memory leaks as well as the usere‑use of freed memory. The method chosen method is called ''reference counting''.| archive-date=18 October 2012| archive-url=https://web.archive.org/web/20121018063230/http://docs.python.org/extending/extending.html#reference-counts| url|archive-statusdate=live18 October 2012 }}</ref> It also featuresuses dynamic [[Name resolution (programming languages)|name resolution]] ([[late binding]]), which binds method and variable names during program execution.
 
Python's design offers some support for functional programming in the "[[Lisp (programming language)|Lisp]] tradition". It has {{codescode|filter}}, {{code|map}}, and {{code|reduce|d=and}} functions; [[list comprehension]]s, [[Associativeassociative array|dictionaries]], [[set (mathematics)|sets]], and [[generator (computer programming)|generator]] expressions.<ref name="AutoNT-59"/> The standard library has two modules ({{codes|itertools}} and {{codes|functools}}) that implement functional tools borrowed from [[Haskell (programming language)|Haskell]] and [[Standard ML]].<ref name="AutoNT-18" />
 
The languagePython's core philosophy is summarized in the document ''The [[Zen of Python]]'' (''PEP 20''), which includes [[aphorism]]saphorisms such as these:<ref name="PEP20" />
<!-- Note this isn't a full list, just some of the more significant aphorisms -->
* Beautiful is better than ugly.
* Explicit is better than implicit.
* Simple is better than complex.
* Complex is better than complicated.
* Readability counts.<!-- Note this isn't a full list, just some of the more significant aphorisms -->
 
However, Python features regularly violate these principles and have received criticism for adding unnecessary language bloat.<ref name=Python-Changes-2014>{{cite web |last=Lutz |first=Mark |date=January 2022 |website=Learning Python |title=Python changes 2014+ |url=https://learning-python.com/python-changes-2014-plus.html |url-status=live |access-date=25 February 2024 |archive-url=https://web.archive.org/web/20240315075935/https://learning-python.com/python-changes-2014-plus.html |archive-date=15 March 2024 }}</ref> Responses to these criticisms note that the Zen of Python is a guideline rather than a rule.<ref name=Confusion-regarding-a-rule-in-the-Zen-of-Python>{{cite web |url=https://discuss.python.org/t/confusion-regarding-a-rule-in-the-zen-of-python/15927 |title=Confusion regarding a rule in 'the Zen of Python' |date=2022-05-03 |df=dmy-all |department=Discussions |series=Python help |website=Python.org |access-date=2024-02-25 |archive-date=25 February 2024 |archive-url=https://web.archive.org/web/20240225221142/https://discuss.python.org/t/confusion-regarding-a-rule-in-the-zen-of-python/15927 |url-status=live}}</ref> The addition of some new features had been controversial: Guido van Rossum resigned as ''Benevolent Dictator for Life'' after conflict about adding the assignment expression operator in {{nobr|Python 3.8&thinsp;.}}<ref name=The-Most-Controversial-Python-Walrus-Operator>{{cite web |last=Ambi |first=Chetan |date=2021-07-04 |df=dmy-all |title=The most controversial Python 'walrus operator' |website=Python simplified (pythonsimplified.com) |url=https://pythonsimplified.com/the-most-controversial-python-walrus-operator/ |url-status=live |access-date=2024-02-05 |archive-url=https://web.archive.org/web/20230827154931/https://pythonsimplified.com/the-most-controversial-python-walrus-operator/ |archive-date=27 August 2023 }}</ref><ref name=The-Controversy-Behind-The-Walrus-Operator-in-Python>{{cite web |last=Grifski |first=Jeremy |date=2020-05-24 |df=dmy-all |title=The controversy behind the 'walrus operator' in Python |website=The Renegade Coder (therenegadecoder.com) |url=https://therenegadecoder.com/code/the-controversy-behind-the-walrus-operator-in-python/ |url-status=live |access-date=2024-02-25 |archive-url=https://web.archive.org/web/20231228135749/https://therenegadecoder.com/code/the-controversy-behind-the-walrus-operator-in-python/ |archive-date=28 December 2023 }}</ref>
Rather than having all of its functionality built into its core, Python was designed to be highly [[Extensibility|extensible]] (with modules). This compact modularity has made it particularly popular as a means of adding programmable interfaces to existing applications. Van Rossum's vision of a small core language with a large standard library and easily extensible interpreter stemmed from his frustrations with [[ABC (programming language)|ABC]], which espoused the opposite approach.<ref name="venners-interview-pt-1" />
 
Nevertheless, rather than building all functionality into its core, Python was designed to be highly [[extensible]] via modules. This compact modularity has made it particularly popular as a means of adding programmable interfaces to existing applications. Van Rossum's vision of a small core language with a large standard library and easily extensible interpreter stemmed from his frustrations with ABC, which represented the opposite approach.<ref name=venners-interview-pt-1/>
Python strives for a simpler, less-cluttered syntax and grammar while giving developers a choice in their coding methodology. In contrast to [[Perl]]'s "[[there is more than one way to do it]]" motto, Python embraces a "there should be one— and preferably only one —obvious way to do it" <!-- the "—" spacing here, although inconsistent with Wikipedia MOS, is quoted text and must be maintained as is; do not "correct" it --> design philosophy.<ref name="PEP20" /> [[Alex Martelli]], a [[Fellow]] at the [[Python Software Foundation]] and Python book author, writes that "To describe something as 'clever' is ''not'' considered a compliment in the Python culture."<ref name="AutoNT-19" />
 
Python claims to strive for a simpler, less-cluttered syntax and grammar, while giving developers a choice in their coding methodology. In contrast to [[Perl]]'s motto "[[there is more than one way to do it]]", Python advocates an approach where "there should be one – and preferably only one – obvious way to do it".<!-- removed comment with specious demand to leave punctuation contrary to Wikipedia MOS unchanged: Reason given, to duplicate lack of spaces in quote, is a grotesquely false justification. --><ref name=PEP20/> In practice, however, Python provides many ways to achieve a given goal. There are, for example, at least three ways to format a string literal, with no certainty as to which one a programmer should use.<ref name=Python-String-Formatting-Best-Practices>{{cite web |last=Bader |first=Dan |title=Python string formatting best practices |website=Real Python (realpython.com) |url=https://realpython.com/python-string-formatting/ |url-status=live |access-date=2024-02-25 |df=dmy-all |archive-url=https://web.archive.org/web/20240218083506/https://realpython.com/python-string-formatting/ |archive-date=18 February 2024 }}</ref> [[Alex Martelli]] is a [[Fellow]] at the [[Python Software Foundation]] and Python book author; he wrote that "To describe something as 'clever' is ''not'' considered a compliment in the Python culture."<ref name=AutoNT-19/>
Python's developers strive to avoid [[premature optimization]], and reject patches to non-critical parts of the [[CPython]] reference implementation that would offer marginal increases in speed at the cost of clarity.<ref name="AutoNT-20" /> When speed is important, a Python programmer can move time-critical functions to extension modules written in languages such as C, or use [[PyPy]], a [[just-in-time compilation|just-in-time compiler]]. [[Cython]] is also available, which translates a Python script into C and makes direct C-level API calls into the Python interpreter.
 
Python's developers usually try to avoid [[premature optimization]]; they also reject patches to non-critical parts of the [[CPython]] reference implementation that would offer marginal increases in speed at the cost of clarity.<ref name="AutoNT-20"/>{{Failed verification|date=August 2025|reason=The referenced source didn't mention either detail.}} Execution speed can be improved by moving speed-critical functions to extension modules written in languages such as [[C (programming language)|C]], or by using a [[just-in-time compiler]] like [[PyPy]]. It is also possible to [[#Cross-compilers to other languages|cross-compile to other languages]]; but this approach either fails to achieve the expected speed-up, since Python is a very [[dynamic language]], or only a restricted subset of Python is compiled (with potential minor semantic changes).<ref name=PyJL/>
Python's developers aim for the language to be fun to use. This is reflected in its name—a tribute to the British comedy group [[Monty Python]]<ref name="AutoNT-24"/>—and in occasionally playful approaches to tutorials and reference materials, such as examples that refer to spam and eggs (a reference to a [[Spam (Monty Python)|Monty Python sketch]]) instead of the standard [[Foobar|foo and bar]].<ref>{{Cite web|url=https://insidetech.monster.com/training/articles/8114-15-ways-python-is-a-powerful-force-on-the-web|title=15 Ways Python Is a Powerful Force on the Web|access-date=3 July 2018|archive-date=11 May 2019|archive-url=https://web.archive.org/web/20190511065650/http://insidetech.monster.com/training/articles/8114-15-ways-python-is-a-powerful-force-on-the-web|url-status=dead}}</ref><ref>{{Cite web|url=https://docs.python.org/3/library/pprint.html|title=8.18. pprint — Data pretty printer — Python 3.8.3 documentation|website=docs.python.org|access-date=4 June 2020|archive-date=22 January 2021|archive-url=https://web.archive.org/web/20210122224848/https://docs.python.org/3/library/pprint.html|url-status=live}}</ref>
 
A common [[neologism]] in the Python community is ''pythonic'',s whichdevelopers canaim havefor athe widelanguage rangeto ofbe meanings relatedfun to program styleuse. ToThis say that codegoal is pythonicreflected isin tothe sayname that ita usestribute Pythonto idiomsthe well,British thatcomedy itgroup is[[Monty naturalPython]]<ref orname=whyname/> shows fluencyand in theplayful language,approaches thatto itsome conformstutorials withand Python'sreference minimalistmaterials. philosophyFor andinstance, emphasissome oncode readability.examples Inuse contrast,the codeterms that"spam" isand difficult"eggs" to(in understandreference orto reads[[Spam like(Monty Python)|a roughMonty transcriptionPython fromsketch]]), anotherrather programmingthan languagethe istypical calledterms ''unpythonic''[[foobar|"foo" and "bar"]].<ref>{{Citecite web |title=15&nbsp;ways Python is a powerful force on the web |url=https://towardsdatascienceinsidetech.monster.com/howtraining/articles/8114-to15-beways-pythonicpython-andis-whya-youpowerful-shouldforce-careon-188d63a5037e|title=Howthe-web to be Pythonic and why you should care|first=Robert|last=Clark|dateurl-status=26dead April 2019|website=Medium|access-date=203 JanuaryJuly 2021|archive-date=132018 August 2021|archive-url=https://web.archive.org/web/2021081319431320190511065650/httpshttp://towardsdatascienceinsidetech.monster.com/howtraining/articles/8114-to15-beways-pythonicpython-andis-whya-youpowerful-shouldforce-careon-188d63a5037e?gi=dd6bc15118b3the-web |urlarchive-statusdate=live11 May 2019 }}</ref><ref name=pprint-doc>{{Citecite web |urltitle=https:/<code>pprint</code> – data pretty printer – {{nobr|Python 3.11.0}} documentation |website=docs.python-guide.org/writing/style |titlequote=Code&nbsp; Style<code>stuff {{=}} The['spam', Hitchhiker'seggs', Guide'lumberjack', to'knights', 'ni']</code>&nbsp; Python|websiteurl=https://docs.python-guide.org/3/library/pprint.html |accessurl-datestatus=20live January 2021|archiveaccess-date=272022-11-05 January|df=dmy-all 2021|archive-url=https://web.archive.org/web/2021012715434120210122224848/https://docs.python-guide.org/writing3/stylelibrary/pprint.html |urlarchive-statusdate=live22 January 2021 }}</ref>
 
A common [[neologism]] in the Python community is ''pythonic'', which has a wide range of meanings related to program style: Pythonic code may use Python [[Programming idiom|idioms]] well; be natural or show fluency in the language; or conform with Python's minimalist philosophy and emphasis on readability.<ref>{{cite web |title=Code style |department=The hitchhiker's guide to Python |website=docs.python-guide.org |url=https://docs.python-guide.org/writing/style |url-status=live |access-date=20 January 2021 |archive-url=https://web.archive.org/web/20210127154341/https://docs.python-guide.org/writing/style/ |archive-date=27 January 2021 }}</ref>
Users and admirers of Python, especially those considered knowledgeable or experienced, are often referred to as ''Pythonistas''.<ref name="AutoNT-27" /><ref name="AutoNT-25" />
 
==Syntax and semantics==
{{Main|Python syntax and semantics}}
[[File:Hello World in Python.png|alt=Block of Python code showing sample source code|thumb|231x231px|An example of Python code and indentation]]
[[File:Af-Helloworld (C Sharp).svg|alt=C code featuring curly braces and semicolon|thumb|233x233px|Example of [[C Sharp (programming language)|C#]] code with curly braces and semicolons]]
 
Python is meant to be an easily readable language. Its formatting is visually uncluttered, and it often uses English keywords where other languages use punctuation. Unlike many other languages, it does not use [[curly bracket programming language|curly brackets]] to delimit blocks, and semicolons after statements are allowed but are rarely, if ever, used. It has fewer syntactic exceptions and special cases than [[C (programming language)|C]] or [[Pascal (programming language)|Pascal]].<ref name="AutoNT-52" />
 
===Indentation===
{{Main|Python syntax and semantics#Indentation}}
 
Python uses [[whitespace character|whitespace]] indentation, rather than [[curly bracket programming language|curly brackets]] or keywords, to delimit [[block (programming)|blocks]]. An increase in indentation comes after certain statements; a decrease in indentation signifies the end of the current block.<ref name="AutoNT-53" /> Thus, the program's visual structure accurately represents the program'sits semantic structure.<ref name=guttag>{{Cite book | publisher = MIT Press | isbn = 978-0-262-52962-4 | last =Guttag Guttag| first = John V. | title = Introduction to Computation and Programming Using Python: With Application to Understanding Data | date = 12 August 2016}}</ref> This feature is sometimes termed the [[off-side rule]], which. someSome other languages share,use indentation this way; but in most languages, indentation does not havehas anyno semantic meaning. The recommended indent size is four spaces.<ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0008/|title=PEP 8 -- Style Guide for Python Code|website=Python.org|access-date=26 March 2019|archive-date=17 April 2019|archive-url=https://web.archive.org/web/20190417223549/https://www.python.org/dev/peps/pep-0008/|url-status=live}}</ref>
 
===Statements and control flow===
Python's [[Statementstatement (computer science)|statements]] include (amongthe others)following:
* The [[Assignment (computer science)|assignment]] statement, using a single equals sign <code>=</code>.
* The <code>[[if-then-else|if]]</code> statement, which conditionally executes a block of code, along with <code>[[Conditional (computer programming)#If–then(–else)|else]]</code> and <code>elif</code> (a contraction of <code>[[Conditional (computer programming)#Else if|else- if]]</code>).
* The <code>[[Foreach#Python|for]]</code> statement, which iterates over an ''iterable'' object, capturing each element to a local variable for use by the attached block.
* The <code>[[While loop#Python|while]]</code> statement, which executes a block of code as long as itsboolean condition is true.
* The <code>[[Exception handling syntax#Python|try]]</code> statement, which allows exceptions raised in its attached code block to be caught and handled by <code>except</code> clauses (or new syntax <code>except*</code> in Python 3.11 for exception groups<ref>{{Cite web |title=8. Errors and Exceptions – Python 3.12.0a0 documentation |url=https://docs.python.org/3.11/tutorial/errors.html |access-date=2022-05-09 |website=docs.python.org |archive-date=9 May 2022 |archive-url=https://web.archive.org/web/20220509145745/https://docs.python.org/3.11/tutorial/errors.html |url-status=live}}</ref>); itthe <code>try</code> statement also ensures that clean-up code in a <code>finally</code> block willis always be run regardless of how the block exits.
* The <code>raise</code> statement, used to raise a specified exception or re-raise a caught exception.
* The <code>class</code> statement, which executes a block of code and attaches its local namespace to a [[class (computer science)|class]], for use in object-oriented programming.
* The <code>def</code> statement, which defines a [[function (computing)|function]] or [[method (computing)|method]].
* The <code>[[dispose pattern#Language constructs|with]]</code> statement, which encloses a code block within a context manager (for example, acquiring a [[lock (computer science)|lock]] before the block of code is run and releasing the lock afterwards, or opening a [[Computer file|file]] and then closing it), allowing [[resource acquisition is initialization|resource-acquisition-is-initialization]] (RAII)-like behavior and replacesreplacing a common try/finally idiom.<ref>{{cite web|url=https://www.python.org/download/releases/2.5/highlights/|title=Highlights: Python 2.5|website=Python.org|access-date=20 March 2018|archive-date=4 August 2019|archive-url=https://web.archive.org/web/20190804120408/https://www.python.org/download/releases/2.5/highlights/|url-status=live}}</ref> Examples of a context include acquiring a [[lock (computer science)|lock]] before some code is run, and then releasing the lock; or opening and then closing a [[Computer file|file]]
* The <code>[[break statement|<code>break]]</code>]] statement, exitswhich fromexits a loop.
* The <code>continue</code> statement, which skips thisthe rest of the current iteration and continues with the next item.
* The <code>del</code> statement, which removes a variable, which meansvariable—deleting the reference from the name to the value, isand deletedproducing andan error if the variable is tryingreferred to usebefore thatit variableis willredefined cause{{efn|<code>del</code> anin error.Python Adoes deletednot variablebehave canthe besame reassignedway <code>delete</code> in languages such as [[C++]] does, where such a word is used to call the [[Destructor (computer programming)|destructor]] and deallocate heap memory.}}
* The <code>pass</code> statement, which servesserving as a [[NOP (code)|NOP]] (i.e., Itno operation), which is syntactically needed to create an empty code block.
* The <code>[[assertion (programming)|assert]]</code> statement, used duringin debugging to check for conditions that should apply.
* The <code>yield</code> statement, which returns a value from a [[generator (computer programming)#Python|generator]] function (and <code>yield</code> is also an operator. This form is); used to implement [[coroutine]]s.
* The <code>return</code> statement, used to return a value from a function.
* The <code>[[include directive|import]]</code> statement,and which<code>from</code> isstatements, used to import modules whose functions or variables can be used in the current program.
* The <code>match</code> and <code>case</code> statements, analogous to a [[switch statement]] construct, which compares an expression against one or more cases as a control-flow measure
 
The assignment statement (<code>=</code>) operates by bindingbinds a name as a [[pointer (computer programming)|reference]] to a separate, dynamically- allocated [[object (computer science)|object]]. Variables may subsequently be rebound at any time to any object. In Python, a variable name is a generic reference holder and does not havewithout a fixed [[Type system|data type]]; associated withhowever, it. However, at a given time, a variable willalways referrefers to ''some'' object, which will havewith a type. This is referred to ascalled [[dynamicType system#Dynamic type checking and runtime type information|dynamic typing]]—in andcontrast is contrasted withto [[statically-typed]] programming languages, where each variable may contain only containa valuesvalue of a certain type.
 
Python does not support [[tail call]] optimization or [[first-class continuations]], and,; according to Guido vanVan Rossum, itthe language never will.<ref name="AutoNT-55" /><ref name="AutoNT-56" /> However, better support for [[coroutine]]-like functionality is provided, by extending Python's [[generator (computer programming)|generators]].<ref name="AutoNT-57" /> Before 2.5, generators were [[lazy evaluation|lazy]] [[iterator]]s; informationdata was passed unidirectionally out of the generator. From Python&nbsp;2.5 on, it is possible to pass informationdata back into a generator function,; and from Python&nbsp;version 3.3, the informationdata can be passed through multiple stack levels.<ref name="AutoNT-58" />
 
===Expressions===
Some Python's [[Expressionexpression (computer science)|expressions]] are similar to those found in languages such as C and [[Java (programming language)|Java]], while someinclude arethe notfollowing:
* AdditionThe <code>+</code>, <code>-</code>, and <code>*</code> operators for mathematical addition, subtraction, and multiplication are thesimilar to other samelanguages, but the behavior of division differs. There are two types of divisionsdivision in Python. They are: [[floor division]] (or integer division) <code>//</code>, and floating-point division <code>/</code>division.<ref>{{cite web|title=division|url=https://docs.python.org|website=python.org|access-date=30 July 2014|archive-date=20 July 2006|archive-url=https://web.archive.org/web/20060720033244/http://docs.python.org/|url-status=live}}</ref> Python also uses the <code>**</code> operator for exponentiation.
* Python uses the <code>+</code> operator for string concatenation. The language uses the <code>*</code> operator for duplicating a string a specified number of times.
* From Python&nbsp;3.5, the new <code>@</code> infix operator was introduced. It is intended to be used by libraries such as [[NumPy]] for [[matrix multiplication]].<ref name=PEP465>{{cite web |title=PEP 0465 -- A dedicated infix operator for matrix multiplication |url=https://www.python.org/dev/peps/pep-0465/ |website=python.org |access-date=1 January 2016 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604224255/https://www.python.org/dev/peps/pep-0465/ |url-status=live }}</ref><ref name=Python3.5Changelog>{{cite web |title=Python 3.5.1 Release and Changelog |url=https://www.python.org/downloads/release/python-351/ |website=python.org |access-date=1 January 2016 |archive-date=14 May 2020 |archive-url=https://web.archive.org/web/20200514034938/https://www.python.org/downloads/release/python-351/ |url-status=live }}</ref>
* From Python&nbsp;3.8, the syntaxThe <code>:=@</code>, called the 'walrusinfix operator'<!-- was introduced. Itin assignsPython values3.5--> is intended to variablesbe asused partby oflibraries asuch largeras [[NumPy]] for [[matrix expressionmultiplication]].<ref name=Python3.8ChangelogPEP465>{{cite web |title=What'sPEP New0465 in PythonA 3.8dedicated infix operator for matrix multiplication |url=https://docswww.python.org/3.8dev/whatsnewpeps/3pep-0465/ |website=python.8.htmlorg |access-date=141 OctoberJanuary 20192016 |archive-date=84 June 2020 |archive-url=https://web.archive.org/web/2020060812434520200604224255/https://docswww.python.org/dev/peps/pep-0465/ |url-status=live}}</ref><ref name=Python3.5Changelog>{{cite web |title=Python 3.85.1 Release and Changelog |url=https:/whatsnew/3www.8python.htmlorg/downloads/release/python-351/ |website=python.org |access-date=1 January 2016 |archive-date=14 May 2020 |archive-url=https://web.archive.org/web/20200514034938/https://www.python.org/downloads/release/python-351/ |url-status=live }}</ref>
* The syntax <code>:=</code>, called the "walrus operator", was introduced in Python 3.8. This operator assigns values to variables as part of a larger expression.<ref name=Python3.8Changelog>{{cite web |title=What's New in Python 3.8 |url=https://docs.python.org/3.8/whatsnew/3.8.html |access-date=14 October 2019 |archive-date=8 June 2020 |archive-url=https://web.archive.org/web/20200608124345/https://docs.python.org/3.8/whatsnew/3.8.html |url-status=live}}</ref>
* In Python, <code>==</code> compares by value, versus Java, which compares numerics by value<ref>{{cite web |url=https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.21.1 |title=Chapter 15. Expressions - 15.21.1. Numerical Equality Operators == and != |publisher=[[Oracle Corporation]] |access-date=28 August 2016 |archive-date=7 June 2020 |archive-url=https://web.archive.org/web/20200607025322/https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.21.1 |url-status=live }}</ref> and objects by reference.<ref>{{cite web |url=https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.21.3 |title=Chapter 15. Expressions - 15.21.3. Reference Equality Operators == and != |publisher=Oracle Corporation |access-date=28 August 2016 |archive-date=7 June 2020 |archive-url=https://web.archive.org/web/20200607025322/https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.21.3 |url-status=live }}</ref> (Value comparisons in Java on objects can be performed with the <code>equals()</code> method.) Python's <code>is</code> operator may be used to compare object identities (comparison by reference). In Python, comparisons may be chained, for example {{code|lang=python|code=a <= b <= c}}.
* In Python, <code>==</code> compares two objects by value. Python's <code>is</code> operator may be used to compare object identities (i.e., comparison by reference), and comparisons may be chained—for example, {{code|lang=python|code=a <= b <= c}}.
* Python uses the words <code>and</code>, <code>or</code>, <code>not</code> for its boolean operators rather than the symbolic <code>&&</code>, <code>||</code>, <code>!</code> used in Java and C.
* Python uses <code>and</code>, <code>or</code>, and <code>not</code> as Boolean operators.
* Python has a type of expression termed a ''[[list comprehension#Python|list comprehension]]'' as well as a more general expression termed a ''[[generator (computer programming)|generator]] expression''.<ref name="AutoNT-59" />
* Python has a type of expression called a ''[[List comprehension#Python|list comprehension]]'', and a more general expression called a ''generator expression''.<ref name="AutoNT-59"/>
* [[Anonymous function]]s are implemented using [[Lambda (programming)|lambda expressions]]; however, these are limited in that the body can only be one expression.
* [[Anonymous function]]s are implemented using [[Lambda (programming)|lambda expressions]]; however, there may be only one expression in each body.
* Conditional expressions in Python are written as {{code|lang=python|code=x if c else y}}<ref name="AutoNT-60" /> (different in order of operands from the <code>[[?:|c ? x : y]]</code> operator common to many other languages).
* Conditional expressions are written as {{code|lang=python|code=x if c else y}}.<ref name="AutoNT-60"/> (This is different in operand order from the <code>[[?:|c ? x : y]]</code> operator common to many other languages.)
* Python makes a distinction between [[list (computer science)|lists]] and [[tuple]]s. Lists are written as {{code|lang=python|code=[1, 2, 3]}}, are mutable, and cannot be used as the keys of dictionaries (dictionary keys must be [[immutable]] in Python). Tuples are written as {{code|lang=python|code=(1, 2, 3)}}, are immutable and thus can be used as the keys of dictionaries, provided all elements of the tuple are immutable. The <code>+</code> operator can be used to concatenate two tuples, which does not directly modify their contents, but rather produces a new tuple containing the elements of both provided tuples. Thus, given the variable <code>t</code> initially equal to {{code|lang=python|code=(1, 2, 3)}}, executing {{code|lang=python|code=t = t + (4, 5)}} first evaluates {{code|lang=python|code=t + (4, 5)}}, which yields {{code|lang=python|code=(1, 2, 3, 4, 5)}}, which is then assigned back to <code>t</code>, thereby effectively "modifying the contents" of <code>t</code>, while conforming to the immutable nature of tuple objects. Parentheses are optional for tuples in unambiguous contexts.<ref>{{cite web|title=4. Built-in Types — Python 3.6.3rc1 documentation|url=https://docs.python.org/3/library/stdtypes.html#tuple|website=python.org|access-date=1 October 2017|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614194325/https://docs.python.org/3/library/stdtypes.html#tuple|url-status=live}}</ref>
* Python featuresmakes ''sequencea unpacking''distinction whereinbetween multiple[[list expressions(computer science)|lists]] and [[tuple]]s. Lists are written as {{code|lang=python|code=[1, each2, evaluating3]}}, toare anythingmutable, thatand cancannot be assignedused toas the keys of dictionaries (asince variabledictionary keys must be [[immutable]] in Python). Tuples, awritten writableas property{{code|lang=python|code=(1, etc.2, 3)}}, are associatedimmutable inand anthus identicalcan mannerbe toused thatas formingthe tuplekeys literalsof anddictionaries, asprovided athat whole,all of the tuple's elements are putimmutable. onThe the<code>+</code> left-handoperator sidecan ofbe theused equalto signconcatenate intwo antuples, assignmentwhich statement.does Thenot statementdirectly expectsmodify antheir ''iterable''contents, objectbut onproduces thea right-handnew sidetuple containing the elements of both. For example, given the variable <code>t</code> initially equal signto that{{code|lang=python|code=(1, produces2, the3)}}, sameexecuting number{{code|lang=python|code=t of= valuest as+ the(4, provided5)}} writablefirst expressionsevaluates when{{code|lang=python|code=t iterated+ through(4, and5)}}, willwhich iterateyields through{{code|lang=python|code=(1, it2, assigning3, each4, of5)}}; thethis producedresult valuesis then assigned back to <code>t</code>—thereby effectively "modifying the correspondingcontents" expressionof on<code>t</code> while conforming to the leftimmutable nature of tuple objects. Parentheses are optional for tuples in unambiguous contexts.<ref>{{cite web|title=5.34. Tuples andBuilt-in SequencesTypes Python 3.76.1rc23rc1 documentation|url=https://docs.python.org/3/tutoriallibrary/datastructuresstdtypes.html#tuples-and-sequencestuple|website=python.org|access-date=171 October 20182017|archive-date=1014 June 2020|archive-url=https://web.archive.org/web/2020061005004720200614194325/https://docs.python.org/3/tutoriallibrary/datastructuresstdtypes.html#tuples-and-sequencestuple|url-status=live}}</ref>
* Python hasfeatures a''sequence "stringunpacking'' format"where operatormultiple <code>%</code>.expressions, Thiseach functions analogouslyevaluating to <code>[[printfsomething format string|printf]]</code> format strings in C,assignable (e.g., {{code|2=python|1="spam=%sa eggs=%d"variable %or ("blah",a writable 2property)}} evaluatesare toassociated <code>"spam=blahjust eggs=2"</code>.as Inin forming Python&nbsptuple literal;3 andas a 2.6+whole, thisthe wasresults supplementedare bythen put on the <code>format()</code>left-hand methodside of the <code>str</code>equal class,sign e.g.in {{code|2=python|1="spam={0}an eggs={1}".format("blah",assignment 2)}}statement. Python&nbsp;3.6This statement addedexpects "fan ''iterable'' object on the right-strings":hand {{code|2=python|1=blahside =of "blah";the eggsequal =sign 2to produce the same number of values as the writable expressions on the left-hand side; f'spam={blah}while iterating, the statement assigns each of eggs={eggs}'}}the values produced on the right to the corresponding expression on the left.<ref name="pep-0498">{{cite web |title=PEP5.3. 498Tuples --and LiteralSequences String InterpolationPython 3.7.1rc2 documentation|url=https://wwwdocs.python.org/dev3/pepstutorial/pepdatastructures.html#tuples-and-0498/ sequences|website=python.org |access-date=817 March 2017October 2018|archive-date=1510 June 2020 |archive-url=https://web.archive.org/web/2020061518414120200610050047/https://wwwdocs.python.org/dev3/pepstutorial/pepdatastructures.html#tuples-0498/ and-sequences|url-status=live }}</ref>
* Python has a "string format" operator <code>%</code> that functions analogously to <code>[[printf]]</code> format strings in the C language—e.g. {{code|2=python|1="spam=%s eggs=%d" % ("blah", 2)}} evaluates to <code>"spam=blah eggs=2"</code>. In Python&nbsp;2.6+ and 3+, this operator was supplemented by the <code>format()</code> method of the <code>str</code> class, e.g., {{code|2=python|1="spam={0} eggs={1}".format("blah", 2)}}. Python&nbsp;3.6 added "f-strings": {{code|2=python|1=spam = "blah"; eggs = 2; f'spam={spam} eggs={eggs}'}}.<ref name="pep-0498">{{cite web |title=PEP 498 – Literal String Interpolation |url=https://www.python.org/dev/peps/pep-0498/ |website=python.org |access-date=8 March 2017 |archive-date=15 June 2020 |archive-url=https://web.archive.org/web/20200615184141/https://www.python.org/dev/peps/pep-0498/ |url-status=live}}</ref>
* Strings in Python can be [[concatenation|concatenated]], by "adding" them (same operator as for adding integers and floats). E.g. {{code|2=python|1="spam" + "eggs"}} returns <code>"spameggs"</code>. Even if your strings contain numbers, they are still added as strings rather than integers. E.g. {{code|2=python|1="2" + "2"}} returns <code>"22"</code>.
* Strings in Python can be [[concatenated]] by "adding" them (using the same operator as for adding integers and floats); e.g., {{code|2=python|1="spam" + "eggs"}} returns <code>"spameggs"</code>. If strings contain numbers, they are concatenated as strings rather than as integers, e.g. {{code|2=python|1="2" + "2"}} returns <code>"22"</code>.
* Python has various kinds of [[string literal]]s:
* Python supports [[string literal]]s in several ways:
** Strings delimited by single or double quote marks. Unlike in [[Unix shell]]s, [[Perl]] and Perl-influenced languages, single quote marks and double quote marks function identically. Both kinds of string use the backslash (<code>\</code>) as an [[escape character]]. [[String interpolation]] became available in Python&nbsp;3.6 as "formatted string literals".<ref name="pep-0498"/>
** Delimited by single or double quotation marks; single and double quotation marks have equivalent functionality (unlike in [[Unix shell]]s, [[Perl]], and Perl-influenced languages). Both marks use the backslash (<code>\</code>) as an [[escape character]]. [[String interpolation]] became available in Python&nbsp;3.6 as "formatted string literals".<ref name="pep-0498"/>
** Triple-quoted strings, which begin and end with a series of three single or double quote marks. They may span multiple lines and function like [[here document]]s in shells, Perl and [[Ruby (programming language)|Ruby]].
** Triple-quoted, i.e., starting and ending with three single or double quotation marks; this may span multiple lines and function like [[here document]]s in shells, Perl, and [[Ruby (programming language)|Ruby]].
** [[Raw string]] varieties, denoted by prefixing the string literal with an <code>r</code>. Escape sequences are not interpreted; hence raw strings are useful where literal backslashes are common, such as [[regular expression]]s and [[Microsoft Windows|Windows]]-style paths. Compare "<code>@</code>-quoting" in [[C Sharp (programming language)|C#]].
** [[Raw string]] varieties, denoted by prefixing the string literal with <code>r</code>. Escape sequences are not interpreted; hence raw strings are useful where literal backslashes are common, such as in [[regular expression]]s and [[Windows]]-style paths. (Compare "<code>@</code>-quoting" in [[C Sharp (programming language)|C#]].)
* Python has [[array index]] and [[array slicing]] expressions on lists, denoted as <code>a[key]</code>, {{code|lang=python|code=a[start:stop]}} or {{code|lang=python|code=a[start:stop:step]}}. Indexes are [[zero-based numbering|zero-based]], and negative indexes are relative to the end. Slices take elements from the ''start'' index up to, but not including, the ''stop'' index. The third slice parameter, called ''step'' or ''stride'', allows elements to be skipped and reversed. Slice indexes may be omitted, for example {{code|lang=python|code=a[:]}} returns a copy of the entire list. Each element of a slice is a [[shallow copy]].
* Python has [[array index]] and [[array slicing]] expressions in lists, which are written as <code>a[key]</code>, {{code|lang=python|code=a[start:stop]}} or {{code|lang=python|code=a[start:stop:step]}}. Indexes are [[zero-based numbering|zero-based]], and negative indexes are relative to the end. Slices take elements from the ''start'' index up to, but not including, the ''stop'' index. The (optional) third slice [[Parameter (computer programming)|parameter]], called ''step'' or ''stride'', allows elements to be skipped or reversed. Slice indexes may be omitted—for example, {{code|lang=python|code=a[:]}} returns a copy of the entire list. Each element of a slice is a [[shallow copy]].
 
In Python, a distinction between expressions and statements is rigidly enforced, in contrast to languages such as [[Common Lisp]], [[Scheme (programming language)|Scheme]], or [[Ruby (programming language)|Ruby]]. This distinction leads to duplicating some functionality., Forfor example:
* [[List comprehensions]] vs. <code>for</code>-loops
* [[Conditional (programming)|Conditional]] expressions vs. <code>if</code> blocks
* The <code>eval()</code> vs. <code>exec()</code> built-in functions (in Python&nbsp;2, <code>exec</code> is a statement); the former function is for expressions, while the latter is for statements.
 
StatementsA statement cannot be a part of an expression; because of this restriction, soexpressions such as list and other<code>dict</code> comprehensions or(and [[Lambda (programming)|lambda expressions]], all being expressions,) cannot contain statements. AAs a particular case of this is that, an assignment statement such as {{code|lang=python|code=a = 1}} cannot formbe part of the conditional expression of a conditional statement. This has the advantage of avoiding a classic C error of mistaking an assignment operator <code>=</code> for an equality operator <code>==</code> in conditions: {{code|lang=c|code=if (c = 1) { ... } }} is syntactically valid (but probably unintended) C code but {{code|lang=python|code=if c = 1: ...}} causes a syntax error in Python.
 
===Methods===
[[Method (computer programming)|Methods]] onof objects are [[function (programming)|functions]] attached to the object's class; the syntax for normal methods and functions, {{code|lang=python|code=instance.method(argument)}}, is, for normal methods and functions, [[syntactic sugar]] for {{code|lang=python|code=Class.method(instance, argument)}}. Python methods have an explicit <code>[[this (computer programming)|self]]</code> parameter to access [[instance data]], in contrast to the implicit self (or <code>this</code>) parameter in some other object-oriented programming languages (e.g., [[C++]], [[Java (programming language)|Java]], [[Objective-C]], or [[Ruby (programming language)|Ruby]]).<ref name="AutoNT-61"/> Python also provides methods, often called ''dunder methods'' (because their names begin and end with double underscores); these methods allow user-defined classes to modify how they are handled by native operations including length, comparison, [[arithmetic operations|arithmetic]], and type conversion.<ref>{{cite book |last1=Sweigart |first1=Al |title=Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code |year=2020 |publisher=No Starch Press |isbn=978-1-59327-966-0 |page=322 |url=https://books.google.com/books?id=7GUKEAAAQBAJ&pg=PA322 |language=en |access-date=7 July 2021 |archive-date=13 August 2021 |archive-url=https://web.archive.org/web/20210813194312/https://books.google.com/books?id=7GUKEAAAQBAJ&pg=PA322 |url-status=live}}</ref>
Apart from this, Python also provides methods, often called ''[[wikt:dunder#English|dunder]] methods'' (due to their names beginning and ending with double-underscores), to allow user-defined classes to modify how they are handled by native operations such as length, comparison, in arithmetic operations, type conversion, and many more.<ref>{{cite book |last1=Sweigart |first1=Al |title=Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code |year=2020 |publisher=No Starch Press |isbn=978-1-59327-966-0 |page=322 |url=https://books.google.com/books?id=7GUKEAAAQBAJ&pg=PA322 |language=en |access-date=7 July 2021 |archive-date=13 August 2021 |archive-url=https://web.archive.org/web/20210813194312/https://books.google.com/books?id=7GUKEAAAQBAJ&pg=PA322 |url-status=live }}</ref>
 
===Typing===
[[File:Python 3.13 TheStandrd standardType type hierarchyHierarchy-en.pngsvg|thumb|The standard type hierarchy in Python &nbsp;3]]
Python uses [[duck typing]], and it has typed objects but untyped variable names. Type constraints are not checked at [[compiledefinition time]]; rather, operations on an object may fail at usage time, signifyingindicating that the given object is not of aan suitableappropriate type. Despite being [[Typedynamically system#Dynamic type checking and runtime type information|dynamically-typed]], Python is [[strongstrongly and weak typing|strongly-typed]], forbidding operations that are notpoorly well-defined (for examplee.g., adding a number toand a string) rather than silentlyquietly attempting to make sense ofinterpret them.
 
Python allows programmers to define their own types using [[class (computer science)|classes]], which are most often used for [[object-oriented programming]]. New [[object (computer science)|instances]] of classes are constructed by calling the class, (for example, {{code|lang=python|code=SpamClass()}} or {{code|lang=python|code=EggsClass()}}), and; the classes are instances of the [[metaclass]] <code>type</code> (itselfwhich is an instance of itself), thereby allowing metaprogramming and [[reflectionReflective (computer science)programming|reflection]].
 
Before version&nbsp; 3.0, Python had two kinds of classes, both using the same syntax: ''old-style'' and ''new-style''.<ref name="classy" /> TheCurrent syntaxPython of both stylesversions issupport the same,semantics theof difference being whetheronly the class <code>object</code> is inherited from, directly or indirectly (all new-style classes inherit from <code>object</code> and are instances of <code>type</code>). In versions of Python&nbsp;2 from Python&nbsp;2.2 onwards, both kinds of classes can be used. Old-style classes were eliminated in Python&nbsp;3.0.
 
ThePython long-term plan is to supportsupports [[gradualoptional typing|optional type annotations]].<ref name="type_hint-PEP"/><ref>{{citeCite web |url=https://lwn.net/Articles/627418/ |title=PEP 484 – Type hintingHints for{{!}} Pythonpeps.python.org |publisherurl=LWNhttps://peps.net |date=24 December 2014python.org/pep-0484/ |access-date=52023-11-29 May 2015|website=peps.python.org |archive-date=2027 JuneNovember 20192023 |archive-url=https://web.archive.org/web/2019062000005720231127205023/https://lwnpeps.netpython.org/Articles/627418pep-0484/ |url-status=live }}</ref> andThese fromannotations Python&nbsp;3.5,are thenot syntaxenforced ofby the language, allowsbut specifyingmay staticbe typesused butby theyexternal aretools notsuch checkedas in'''mypy''' theto defaultcatch implementation, [[CPython]]errors.<ref>{{cite Anweb experimental|title=typing optional staticSupport for type checkerhints named|url=https://docs.python.org/3/library/typing.html ''mypy''|website=Python supportsdocumentation compile|publisher=Python Software Foundation |access-timedate=22 typeDecember checking2023 |archive-date=21 February 2020 |archive-url=https://web.archive.org/web/20200221184042/https://docs.python.org/3/library/typing.html |url-status=live}}</ref><ref>{{cite web |url=http://mypy-lang.org/ |title=mypy - Optional Static Typing for Python |access-date=28 January 2017 |archive-date=6 June 2020 |archive-url=https://web.archive.org/web/20200606192012/http://mypy-lang.org/ |url-status=live}}</ref> Mypy also supports a Python compiler called mypyc, which leverages type annotations for optimization.<ref>{{cite web |title=Introduction |url=https://mypyc.readthedocs.io/en/latest/introduction.html |website=mypyc.readthedocs.io |access-date=22 December 2023 |archive-date=22 December 2023 |archive-url=https://web.archive.org/web/20231222000457/https://mypyc.readthedocs.io/en/latest/introduction.html |url-status=live}}</ref>
 
{|class="wikitable"
|+ Summary of Python 3's built-in types
|-
! Type
! [[immutable object|Mutability]]
! Description
! style="width: 23em;" | Syntax examples
|-
| <code>bool</code>
| immutable
| [[Boolean value]]
| {{code|lang=python|True}}<br />{{code|lang=python|False}}
|-
| <code>bytearray</code>
| mutable
| Sequence of [[byte]]s
| {{code|lang=python|bytearray(b'Some ASCII')}}<br />{{code|lang=python|bytearray(b"Some ASCII")}}<br />{{code|lang=python|bytearray([119, 105, 107, 105])}}
|-
| <code>bytes</code>
| immutable
| Sequence of bytes
| {{code|lang=python|b'Some ASCII'}}<br />{{code|lang=python|b"Some ASCII"}}<br />{{code|lang=python|bytes([119, 105, 107, 105])}}
|-
| <code>complex</code>
| immutable
| [[Complex number]] with real and imaginary parts
| {{code|lang=python|3+2.7j}}<br />{{code|lang=python|3 + 2.7j}}
|-
| <code>dict</code>
| mutable
| [[Associative array]] (or dictionary) of key and value pairs; can contain mixed types (keys and values),; keys must be a hashable type
| {{code|lang=python|{'key1': 1.0, 3: False} }}<br />{{code|lang=python| {} }}
|-
| <code>ellipsistypes.EllipsisType</code>{{ref|inaccessible-type|a}}
| immutable
| An [[Ellipsis (programming operator)|ellipsis]] placeholder to be used as an index in [[NumPy]] arrays
| {{code|lang=python|...}}<br />{{code|lang=python|Ellipsis}}
|-
| <code>float</code>
| immutable
| [[Double-precision floating-point format|Double-precision]] [[floating-point arithmetic|floating-point number]]. The precision is machine-dependent, but in practice it is generally implemented as a 64-bit [[IEEE &nbsp;754]] number with 53 &nbsp;bits of precision.<ref>{{Cite web
|title=15. Floating Point Arithmetic: Issues and Limitations Python 3.8.3 documentation
|url=https://docs.python.org/3.8/tutorial/floatingpoint.html#representation-error
|access-date=6 June 2020
|website=docs.python.org
|quote=Almost all machines today (November 2000) use IEEE-754 floating point arithmetic, and almost all platforms map Python floats to IEEE-754 “double"double precision”precision".
|archive-date=6 June 2020
|archive-url=https://web.archive.org/web/20200606113842/https://docs.python.org/3.8/tutorial/floatingpoint.html#representation-error
|url-status=live
}}</ref>
|
{{code|lang=python|1.33333}}
Line 230 ⟶ 252:
| <code>frozenset</code>
| immutable
| Unordered [[Setset (computer science)|set]], contains no duplicates; can contain mixed types, if hashable
| {{nobr|{{code|lang=python|frozenset([4.0, 'string', True])}}}}
|-
| <code>int</code>
| immutable
| [[Integer (computer science)|Integer]] of unlimited magnitude<ref name="pep0237" />
| {{code|lang=python|42}}
|-
Line 241 ⟶ 263:
| mutable
| [[list (computer science)|List]], can contain mixed types
| {{code|lang=python|[4.0, 'string', True]}}<br />{{code|lang=python|[]}}
|-
| <code>types.NoneType</code>{{ref|inaccessible-type|a}}
| immutable
| An object representing the absence of a value, often called [[Nullnull pointer|null]] in other languages
| {{code|lang=python|None}}
|-
| <code>types.NotImplementedType</code>{{ref|inaccessible-type|a}}
| immutable
| A placeholder that can be returned from [[Operator overloading|overloaded operators]] to indicate unsupported operand types.
Line 255 ⟶ 277:
| <code>range</code>
| immutable
| AAn Sequence''immutable sequence'' of numbers, commonly used for loopingiterating a specific number of times in <code>for</code> loops<ref>{{cite web |title=Built-in Types |url=https://docs.python.org/3/library/stdtypes.html#typesseq-range |access-date=3 October 2019 |archive-date=14 June 2020 |archive-url=https://web.archive.org/web/20200614194325/https://docs.python.org/3/library/stdtypes.html#typesseq-range |url-status=live }}</ref>
| {{code|lang=python|range(-1−1, 10)}}<br />{{code|lang=python|range(10, -5−5, -2−2)}}
|-
| <code>set</code>
| mutable
| Unordered [[set (computer science)|set]], contains no duplicates; can contain mixed types, if hashable
| {{code|lang=python| {4.0, 'string', True} }}<br />{{code|lang=python|set()}}
|-
| <code>str</code>
| immutable
| A [[string (computer science)|character string]]: sequence of Unicode codepoints
| {{code|lang=python|'Wikipedia'}}<br />{{code|lang=python|"Wikipedia"}}<br><syntaxhighlight lang="python">"""Spanning
multiple
lines"""</syntaxhighlight>
Line 272 ⟶ 294:
| <code>tuple</code>
| immutable
| Can[[Tuple]], can contain mixed types
| {{code|lang=python|(4.0, 'string', True)}}<br />{{code|lang=python|('single element',)}}<br />{{code|lang=python|()}}
|}
 
{{note|inaccessible-type|a|Not directly accessible by name}}
 
===Arithmetic operations===
Python hasincludes the usualconventional symbols for arithmetic operators (<code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>), the floor -division operator <code>//</code>, and the [[modulo operation|modulo operator]] <code>%</code>. (whereWith the modulo operator, a remainder can be negative, <!--unlike in C language depending on compiler,<ref>{{Cite web|url=https://stackoverflow.com/questions/11720656/modulo-operation-with-negative-numbers/42131603|title=c - Modulo operation with negative numbers|quote=Note that, in C89, whether the result round upward or downward is implementation-defined.|website=Stack Overflow|access-date=25 September 2019}}</ref>--> e.g., <code>4 % -3 == -2</code>).) ItPython also hasoffers the <code>**</code> symbol for [[exponentiation]], e.g. <code>5**3 == 125</code> and <code>9**0.5 == 3.0</code>,; andit aalso offers the matrix‑multiplication operator <code>@</code> .<ref>{{cite web |url=https://legacy.python.org/dev/peps/pep-0465/ |title=PEP 465 -- A dedicated infix operator for matrix multiplication |work=python.org |access-date=3 July 2018 |archive-date=29 May 2020 |archive-url=https://web.archive.org/web/20200529200310/https://legacy.python.org/dev/peps/pep-0465/ |url-status=live }}</ref> These operators work likeas in traditional mathmathematics; with the same [[order of operations|precedence rules]], the operators [[Infixinfix notation|infix]] (operators <code>+</code> and <code>-</code> can also be [[Unaryunary operation|unary]], to represent positive and negative numbers respectively).
 
Division between integers produces floating-point results. The behavior of division has changed significantly over time:<ref name="pep0238"/>
* The current version of Python (i.e., since 3.0) changed <code>the /</code> operator to always represent floating-point division, e.g., {{code|class=nowrap|2=python|1=5/2 == 2.5}}.
* The floor division <code>//</code> operator was introduced. Thus <code>7//3 == 2</code>, <code>-7//3 == -3</code>, <code>7.5//3 == 2.0</code>, and <code>-7.5//3 == -3.0</code>. For outdated Python 2.7 adding the {{code|class=nowrap|2=python2|1=from __future__ import division}} statement causes a module in Python 2.7 to use Python&nbsp;3.0 rules for division instead (see above).
 
In Python terms, the <code>/</code> operator represents ''true division'' (or simply ''division''), while the <code>//</code> operator represents ''floor division.'' Before version 3.0, the <code>/</code> operator represents ''classic division''.<ref name="pep0238"/>
The division between integers produces floating-point results. The behavior of division has changed significantly over time:<ref name="pep0238"/>
* Current Python (i.e. since 3.0) changed <code>/</code> to always be floating-point division, e.g. {{code|class=nowrap|2=python|1=5/2 == 2.5}}.
* Python&nbsp;2.2 changed integer division to round towards negative infinity, e.g. <code>7/3 == 2</code> and <code>-7/3 == -3</code>. The floor division <code>//</code> operator was introduced. So <code>7//3 == 2</code>, <code>-7//3 == -3</code>, <code>7.5//3 == 2.0</code> and <code>-7.5//3 == -3.0</code>. Adding {{code|class=nowrap|2=python2|1=from __future__ import division}} causes a module to use Python&nbsp;3.0 rules for division (see next).
* Python&nbsp;2.1 and earlier used C's division behavior. The <code>/</code> operator is integer division if both operands are integers, and floating-point division otherwise. Integer division rounds towards 0, e.g. {{code|class=nowrap|2=python|1=7/3 == 2}} and {{code|class=nowrap|2=python|1=-7/3 == -2}}.
 
[[Rounding]] towards negative infinity, though a different method than in most languages, adds consistency to Python. For instance, this rounding implies that the equation {{code|class=nowrap|2=python|1=(a + b)//b == a//b + 1}} is always true. The rounding also implies that the equation {{code|class=nowrap|2=python|1=b*(a//b) + a%b == a}} is valid for both positive and negative values of <code>a</code>. As expected, the result of <code>a%b</code> lies in the [[half-open interval]] [0, ''b''), where <code>b</code> is a positive integer; however, maintaining the validity of the equation requires that the result must lie in the interval (''b'', 0] when <code>b</code> is negative.<ref name="AutoNT-62"/>
In Python terms, <code>/</code> is ''true division'' (or simply ''division''), and <code>//</code> is ''floor division.'' <code>/</code> before version 3.0 is ''classic division''.<ref name="pep0238"/>
 
Python provides a <code>round</code> function for rounding a float to the nearest integer. For [[Rounding#Tie-breaking|tie-breaking]], Python&nbsp;3 uses the ''round to even'' method: <code>round(1.5)</code> and <code>round(2.5)</code> both produce <code>2</code>.<ref name="AutoNT-64"/> Python versions before 3 used the [[Rounding#Rounding away from zero|round-away-from-zero]] method: <code>round(0.5)</code> is <code>1.0</code>, and <code>round(-0.5)</code> is <code>−1.0</code>.<ref name="AutoNT-63"/>
Rounding towards negative infinity, though different from most languages, adds consistency. For instance, it means that the equation {{code|class=nowrap|2=python|1=(a + b)//b == a//b + 1}} is always true. It also means that the equation {{code|class=nowrap|2=python|1=b*(a//b) + a%b == a}} is valid for both positive and negative values of <code>a</code>. However, maintaining the validity of this equation means that while the result of <code>a%b</code> is, as expected, in the [[half-open interval]] [0, ''b''), where <code>b</code> is a positive integer, it has to lie in the interval (''b'', 0] when <code>b</code> is negative.<ref name="AutoNT-62" />
 
Python providesallows aBoolean <code>round</code>expressions functionthat forcontain [[rounding]]multiple aequality floatrelations to thebe nearestconsistent integerwith general usage in mathematics. For [[Rounding#Tie-breaking|tie-breaking]]example, Python&nbsp;3the usesexpression [[round<code>a to< even]]:b < c</code>round(1.5) tests whether <code>a</code> is less than <code>b</code> and <code>round(2.5)b</code> bothis less producethan <code>2c</code>.<ref name="AutoNT-6465" /> VersionsC-derived beforelanguages 3interpret usedthis [[Rounding#Roundingexpression awaydifferently: fromin zero|round-away-from-zero]]:C, the expression would first evaluate <code>round(0.5)</code>a is< <code>1.0b</code>, <code>round(-resulting in 0.5)</code> isor 1, and that result would then be compared with <code>−1.0c</code>.<ref name="AutoNT-63CPL" />
 
Python uses [[arbitrary-precision arithmetic]] for all integer operations. The <code>Decimal</code> type/class in the <code>decimal</code> module provides [[decimal floating point|decimal floating-point numbers]] to a pre-defined arbitrary precision with several rounding modes.<ref name="AutoNT-88"/> The <code>Fraction</code> class in the <code>fractions</code> module provides arbitrary precision for [[rational number]]s.<ref>{{cite web|title=What's New in Python 2.6 |url=https://docs.python.org/2.6/whatsnew/2.6.html|website=Python v2.6.9 documentation |date=Oct 29, 2013 |access-date=26 September 2015|archive-date=23 December 2019|archive-url=https://web.archive.org/web/20191223213856/https://docs.python.org/2.6/whatsnew/2.6.html|url-status=live}}</ref>
Python allows boolean expressions with multiple equality relations in a manner that is consistent with general use in mathematics. For example, the expression <code>a < b < c</code> tests whether <code>a</code> is less than <code>b</code> and <code>b</code> is less than <code>c</code>.<ref name="AutoNT-65" /> C-derived languages interpret this expression differently: in C, the expression would first evaluate <code>a < b</code>, resulting in 0 or 1, and that result would then be compared with <code>c</code>.<ref name="CPL" />
 
PythonDue usesto [[arbitrary-precisionPython's arithmetic]]extensive formathematics alllibrary integerand operations.the Thethird-party <code>Decimal</code>library type/class in[[NumPy]], the <code>decimal</code>language moduleis providesfrequently [[decimalused floatingfor point|decimalscientific floating-pointscripting numbers]]in totasks asuch pre-definedas numerical arbitrarydata precisionprocessing and several rounding modesmanipulation.<ref>{{citeCite web|title = PEP 0327 -- Decimal Data Type|url = https://www.pythonstat.orgwashington.edu/dev~hoytak/peps/pep-0327blog/whypython.html|website title=10 Reasons Python.org|access-date =Rocks 26for SeptemberResearch 2015|last(And a Few Reasons it Doesn't) – Hoyt Koepke|website=University of Washington Department of Statistics Batista|firstaccess-date=3 =February Facundo2019|archive-date =31 4 JuneMay 2020|archive-url = https://web.archive.org/web/2020060423483020200531211840/https://www.pythonstat.orgwashington.edu/dev~hoytak/peps/pep-0327blog/whypython.html|url-status = livedead}}</ref> The <code>Fraction</code> class in the <code>fractions</code> module provides arbitrary precision for [[rational number]]s.<ref>{{citeCite web|title = What's New in Python 2.6 — Python v2.6.9 documentation|url = https://docsengineering.pythonucsb.orgedu/2.6~shell/whatsnewche210d/2python.6.htmlpdf|websitetitle=An introduction to Python for scientific computing|last=Shell|first=Scott|date=17 docs.python.orgJune 2014|access-date =3 26February September 20152019|archive-date =4 23 DecemberFebruary 2019|archive-url = https://web.archive.org/web/2019122321385620190204014642/https://docsengineering.pythonucsb.orgedu/2.6~shell/whatsnewche210d/2python.6.htmlpdf|url-status = live}}</ref>
 
===Function syntax===
Due to Python's extensive mathematics library, and the third-party library [[NumPy]] that further extends the native capabilities, it is frequently used as a scientific scripting language to aid in problems such as numerical data processing and manipulation.<ref>{{Cite web|url=https://www.stat.washington.edu/~hoytak/blog/whypython.html|title=10 Reasons Python Rocks for Research (And a Few Reasons it Doesn't) – Hoyt Koepke|website=www.stat.washington.edu|access-date=3 February 2019|archive-date=31 May 2020|archive-url=https://web.archive.org/web/20200531211840/https://www.stat.washington.edu/~hoytak/blog/whypython.html|url-status=dead}}</ref><ref>{{Cite web|url=https://engineering.ucsb.edu/~shell/che210d/python.pdf|title=An introduction to Python for scientific computing|last=Shell|first=Scott|date=17 June 2014|access-date=3 February 2019|archive-date=4 February 2019|archive-url=https://web.archive.org/web/20190204014642/https://engineering.ucsb.edu/~shell/che210d/python.pdf|url-status=live}}</ref>
[[Function (computer programming)|Functions]] are created in Python by using the <code>def</code> keyword. A function is defined similarly to how it is called, by first providing the function name and then the required parameters. Here is an example of a function that prints its inputs:
<syntaxhighlight lang="python3">
def printer(input1, input2="already there"):
print(input1)
print(input2)
printer("hello")
# Example output:
# hello
# already there
</syntaxhighlight>To assign a default value to a function parameter in case no actual value is provided at run time, variable-definition syntax can be used inside the function header.
 
==ProgrammingCode examples==
[["Hello, World!" program|Hello world]] program:
<syntaxhighlight lang="python">
print('Hello, world!')
Line 305 ⟶ 338:
 
Program to calculate the [[factorial]] of a positive integer:
<syntaxhighlight lang="python" line="1">
n = int(input('Type a number, and its factorial will be printed: '))
 
if n < 0:
raise ValueError('You must enter a non -negative integer')
 
factorial = 1
Line 316 ⟶ 349:
 
print(factorial)
 
</syntaxhighlight><!--
 
Please don’tdon't add more examples.
 
-->
 
==Libraries==
Python's large standard library, commonly cited as one of its greatest strengths,<ref name="AutoNT-86" /> providesis toolscommonly suitedcited toas manyone tasksof its greatest strengths. For Internet-facing applications, many standard formats and protocols such as [[MIME]] and [[Hypertext Transfer Protocol|HTTP]] are supported. ItThe language includes modules for creating [[graphical user interface]]s, connecting to [[relational database]]s, [[pseudorandom number generator|generating pseudorandom numbers]], arithmetic with arbitrary-precision decimals,<ref name="AutoNT-88" /> manipulating [[regular expression]]s, and [[unit testing]].
 
Some parts of the standard library are covered by specifications (forspecifications—for example, the [[Web Server Gateway Interface]] (WSGI) implementation <code>wsgiref</code> follows PEP 333<ref name="AutoNT-89" />), but—but most modules are not. Theyparts are specified by their code, internal documentation, and [[test suite]]s. However, because most of the standard library is cross-platform Python code, only a few modules needmust be alteringaltered or rewritingrewritten for variant implementations.
 
{{As of|20212025|0903|13|post=,}} the [[Python Package Index]] (PyPI), the official repository for third-party Python software, contains over 329614,000339<ref name="Modulecounts 2021PyPI">{{cite web |titledate=Modulecounts2025-03-13 |websitetitle=Modulecounts |date=2021-09-28PyPI |url=httphttps://wwwpypi.modulecounts.comorg/ |url-status=live |archive-url=https://web.archive.org/web/2021092413560720250222013445/httphttps://wwwpypi.modulecounts.comorg/ |archive-date=20212025-0902-2422 |url-statuswebsite=live |access-date=2021-09-28PyPI}}</ref> packages. withThese have a wide range of functionality, including the following:
 
{{columns-list|colwidth=30em|
* [[Automation]]
* [[Data analytics]]
* [[DatabasesDatabase]]s
* [[Documentation]]
* [[Graphical user interfacesinterface]]s
* [[Image processing]]
* [[Machine learning]]
* [[Mobile Appapp]]s
* [[Multimedia]]
* [[Computer networking]]
Line 351 ⟶ 385:
{{See also|Comparison of integrated development environments#Python}}
 
Most{{which?|date=August 2025}} Python implementations (including CPython) include a [[read–eval–print loop]] (REPL),; permittingthis permits the themenvironment to function as a [[command line interpreter]], forwith which the userusers entersenter statements sequentially and receivesreceive results immediately.<ref>{{cite web |title=Glossary: interactive |url=https://docs.python.org/3/glossary.html#term-interactive |website=Python documentation |access-date=31 August 2025 |language=en |version=v3.13.7}}</ref>
 
Python is also bundled with an [[integrated development environment|integrated development environment (IDE)]] called [[IDLE]],<ref name="idle">{{cite web |title=IDLE — Python editor and shell |url=https://docs.python.org/3/library/idle.html |website=Python documentation |version=v3.13.7 |access-date=31 August 2025 |language=en |quote=IDLE is Python's Integrated Development and Learning Environment.}}</ref> which is oriented toward beginners.{{cn|date=August 2025}}
 
Other shells, including [[IDLE]] and [[IPython]], add additional capabilities such as improved auto-completion, session-state retention, and [[syntax highlighting]].<ref name="idle" /><ref>{{cite web |title=IPython Documentation |url=https://ipython.readthedocs.io/en/stable/ |access-date=31 August 2025 |archive-url=https://web.archive.org/web/20250831204721/https://ipython.readthedocs.io/en/stable/ |archive-date=2025-08-31 |language=en |version=v9.5.0 |date=August 29, 2025 |url-status=live}}</ref>
 
Standard desktop IDEs include [[PyCharm]], [[Spyder (software)|Spyder]], and [[Visual Studio Code]];{{cn|date=August 2025}} there are also [[web browser]]-based IDEs, such as the following environments:
Other shells, including [[IDLE]] and [[IPython]], add further abilities such as improved auto-completion, session state retention and [[syntax highlighting]].
 
As well as standard desktop* [[integratedProject developmentJupyter|Jupyter environmentNotebooks]]s, therean are [[Web browser]]open-basedsource IDEs;interactive [[SageMath]]computing (intended for developing science and math-related Python programs)platform; [[PythonAnywhere]], a browser-based IDE and hosting environment; and Canopy IDE, a commercial Python IDE emphasizing [[scientific computing]].<ref>{{cite web|last1=Enthought|first1=Canopy |title=CanopyProject Jupyter |url=https://wwwjupyter.enthought.com/products/canopy/org |website=wwwJupyter.enthought.comorg |access-date=202 April August2025 2016|archive-date=1512 JulyOctober 2023 2017|archive-url=https://web.archive.org/web/2017071515170320231012055917/https://wwwjupyter.enthought.com/products/canopyorg/ |url-status=deadlive}}</ref>
* [[PythonAnywhere]], a browser-based IDE and hosting environment; and
* Canopy, a commercial IDE from [[Enthought]] that emphasizes [[scientific computing]].<ref>{{cite web |last1=Harper |first1=Doug |title=Enthought Canopy |url=http://physics.wku.edu/phys316/software/canopy/ |website=WKU Physics 316 |publisher=[[Western Kentucky University]] |access-date=31 August 2025 |archive-url=https://web.archive.org/web/20240818041226/http://physics.wku.edu/phys316/software/canopy/ |archive-date=2024-08-18 |language=en |date=Spring 2024 |url-status=live}}</ref><ref>{{cite web|title=Enthought Canopy|url=https://www.enthought.com/products/canopy/|website=[[Enthought]]|access-date=20 August 2016|archive-date=15 July 2017|archive-url=https://web.archive.org/web/20170715151703/https://www.enthought.com/products/canopy/|url-status=dead}}</ref>
 
==Implementations==
Line 361 ⟶ 401:
 
===Reference implementation===
[[CPython]] is the [[reference implementation]] of Python. ItThis implementation is written in C, meeting the [[C89C11 (C versionstandard revision)|C89C11]] standard with several select [[C99]] features (with later C versions out, it's considered outdated;<ref>{{Cite web |title=MailmanPEP 37 Why aren'tStyle weGuide allowingfor theC useCode of C11? - Python-Dev -{{!}} peps.python.org |url=https://mailpeps.python.org/archives/list/pythonpep-dev@python.org/thread/PLXETSQE7PRFXBXN2QY6VNPKUTM6I7OD0007/ |access-date=20212022-0304-0128 |website=mailpeps.python.org|language=en |archive-date=1424 April 20212022 |archive-url=https://web.archive.org/web/2021041420331320220424202827/https://mailpeps.python.org/archives/list/pythonpep-dev@python.org/thread/PLXETSQE7PRFXBXN2QY6VNPKUTM6I7OD0007/ |url-status=live}}</ref><ref>{{Cite web|title=Issue 35473: Intel compiler (icc)since doesversion not fully support C11 Features3.11, includingolder atomicsversions -use Pythonthe tracker|url=https://bugs.python.org/issue35473|access-date=2021-03-01|website=bugs.python.org|archive-date=14[[C89 April(C 2021version)|archive-url=https://web.archive.org/web/20210414203314/https://bugs.python.org/issue35473|url-status=live}}</ref>C89]] <!--standard https://github.com/pybind/pybind11with -->several CPythonselect includes[[C99]] its own C extensionsfeatures), but third-party extensions are not limited to older C versionsversions—e.g., they can e.g. be implemented withusing [[C11 (C standard revision)|C11]] or C++.<ref>{{Cite web|title=4. Building C and C++ Extensions Python 3.9.2 documentation|url=https://docs.python.org/3/extending/building.html|access-date=2021-03-01|website=docs.python.org|archive-date=3 March 2021|archive-url=https://web.archive.org/web/20210303002519/https://docs.python.org/3/extending/building.html|url-status=live}}</ref>).<ref name="AutoNT-66" /> ItCPython [[compiler|compiles]] Python programs into an intermediate [[bytecode]],<ref name="AutoNT-67" /> which is then executed by itsa [[virtual machine]].<ref name="AutoNT-68" /> CPython is distributed with a large standard library written in a mixturecombination of C and native Python. It is available for many platforms, including Windows (<!--"Windows Vista support dropped in Python 3.7"-->starting with Python&nbsp;3.9, the Python installer deliberately fails to install on [[Windows 7]] and 8;<ref>{{Cite web|title=Changelog — Python 3.9.0 documentation|url=https://docs.python.org/release/3.9.0/whatsnew/changelog.html#changelog|access-date=2021-02-08|website=docs.python.org|archive-date=7 February 2021|archive-url=https://web.archive.org/web/20210207001142/https://docs.python.org/release/3.9.0/whatsnew/changelog.html#changelog|url-status=live}}</ref><ref>{{Cite web|title=Download Python|url=https://www.python.org/downloads/release/python-391|access-date=2020-12-13|website=Python.org|language=en|archive-date=8 December 2020|archive-url=https://web.archive.org/web/20201208045225/https://www.python.org/downloads/release/python-391/|url-status=live}}</ref> [[Windows XP]] was supported until Python&nbsp;3.5<!--"Windows XP support dropped in Python 3.5"-->) and most modern [[Unix-like]] systems, including macOS (and [[Apple M1]] Macs, since Python&nbsp;3.9.1, with experimental installer) and unofficial support for e.g. [[OpenVMS|VMS]].<!--"Put online a new version of Python 3.10.0a (IA64only)"--><ref>{{Cite web|title=history [vmspython]|url=https://www.vmspython.org/doku.php?id=history|access-date=2020-12-04|website=www.vmspython.org|archive-date=2 December 2020|archive-url=https://web.archive.org/web/20201202194743/https://www.vmspython.org/doku.php?id=history|url-status=live}}</ref> Platform portability was one of its earliest priorities,<ref name="AutoNT-69" /> during the Python&nbsp;1 and Python&nbsp;2 time-frame, even [[OS/2]] and [[Solaris (operating system)|Solaris]] were supported;<!-- Also python-3.2.2 at http://unixpackages.com/packages/package-list --><ref>{{Cite web|title=Download Python for Other Platforms|url=https://www.python.org/download/other/|access-date=2020-12-04|website=Python.org|language=en|archive-date=27 November 2020|archive-url=https://web.archive.org/web/20201127015815/https://www.python.org/download/other/|url-status=live}}</ref> support has since been dropped for a lot of platforms.<!--
 
CPython is available for many platforms, including Windows and most modern [[Unix-like]] systems, including macOS (and [[Apple M1]] Macs, since Python&nbsp;3.9.1, using an experimental installer). <!-- "Windows Vista support dropped in Python 3.7" -->Starting with Python&nbsp;3.9, the Python installer intentionally fails to install on [[Windows 7]] and 8<!-- but not 8.1? -->;<ref>{{Cite web |title=Changelog – Python 3.9.0 documentation |url=https://docs.python.org/release/3.9.0/whatsnew/changelog.html#changelog |url-status=live |archive-url=https://web.archive.org/web/20210207001142/https://docs.python.org/release/3.9.0/whatsnew/changelog.html#changelog |archive-date=7 February 2021 |access-date=2021-02-08 |website=docs.python.org}}</ref><ref>{{Cite web |title=Download Python |url=https://www.python.org/downloads/release/python-391 |url-status=live |archive-url=https://web.archive.org/web/20201208045225/https://www.python.org/downloads/release/python-391/ |archive-date=8 December 2020 |access-date=2020-12-13 |website=Python.org |language=en}}</ref> [[Windows XP]] was supported until Python&nbsp;3.5<!--"Windows XP support dropped in Python 3.5"-->, with unofficial support for [[OpenVMS|VMS]].<!--"Put online a new version of Python 3.10.0a (IA64only)"--><ref>{{Cite web|title=history [vmspython]|url=https://www.vmspython.org/doku.php?id=history|access-date=2020-12-04|website=www.vmspython.org|archive-date=2 December 2020|archive-url=https://web.archive.org/web/20201202194743/https://www.vmspython.org/doku.php?id=history|url-status=live}}</ref> Platform portability was one of Python's earliest priorities.<ref name="AutoNT-69" /> During development of Python&nbsp;1 and 2, even [[OS/2]] and [[Solaris (operating system)|Solaris]] were supported;<!-- Also python-3.2.2 at http://unixpackages.com/packages/package-list --><ref>{{Cite web|title=Download Python for Other Platforms|url=https://www.python.org/download/other/|access-date=2020-12-04|website=Python.org|language=en|archive-date=27 November 2020|archive-url=https://web.archive.org/web/20201127015815/https://www.python.org/download/other/|url-status=live}}</ref> since that time, support has been dropped for many platforms.<!--
Include more, here or in the infobox? I find e.g.:
best-effort support:
 
Android API 24
 
and also:
 
Starting with CPython 3.7.0, *nix platforms are expected to provide at least one of C.UTF-8 (full locale), C.utf8 (full locale) or UTF-8 (LC_CTYPE-only locale) as an alternative to the legacy C locale.
-->
 
All current Python versions (since 3.7) support only operating systems that feature multithreading<!-- (then in 3.7 removing support for [[IRIX]]; and before many other operating systems such as [[OS/2]] and [[VMS]]) -->, by now supporting not nearly as many operating systems (dropping many outdated) than in the past.
 
===Other implementations===
All alternative implementations have at least slightly different semantics. For example, an alternative may include unordered dictionaries<!-- like with Codon; also PyPy? Cython? -->, in contrast to other current Python versions. As another example in the larger Python ecosystem, PyPy does not support the full C Python API. Alternative implementations include the following:
* [[PyPy]] is a fast, compliant interpreter of Python&nbsp;2.7 and 3.6.<ref name="AutoNT-70" /> Its [[Just-in-time compilation|just-in-time compiler]] brings a significant speed improvement over CPython but several libraries written in C cannot be used with it.<ref name="AutoNT-71" />
 
* [[Stackless Python]] is a significant fork of CPython that implements [[microthread]]s; it does not use the [[call stack]] in the same way, thus allowing massively concurrent programs. PyPy also has a stackless version.<ref name="AutoNT-73" />
* [[MicroPythonPyPy]] andis [[CircuitPython]]a arefast, compliant interpreter of Python&nbsp;32.7 variantsand optimized<!-- for3.8 [[microcontroller]]s,(both includingare [[Legooutdated MindstormsCPython EV3]]versions) --> 3.10.<ref name="AutoNT-70"/><ref>{{Cite web|last=Team|first=The PyPy|date=2019-12-28|title=Download and Install|url=https://educationwww.legopypy.comorg/endownload.html|access-us/support/mindstorms-ev3/python-for-ev3|titledate=Python2022-for01-EV308|website=LEGO EducationPyPy|language=en|access-date=17 April 2019|archive-date=78 JuneJanuary 20202022|archive-url=https://web.archive.org/web/2020060723481420220108212951/https://educationwww.legopypy.com/en-us/supportorg/mindstorms-ev3/python-for-ev3download.html|url-status=live}}</ref> PyPy's [[just-in-time compiler]] often improves speed significantly relative to CPython, but PyPy does not support some libraries written in C.<ref name="AutoNT-71"/> PyPy offers support for the [[RISC-V]] instruction-set architecture.
* Codon is an implementation with an [[ahead-of-time compilation|ahead-of-time (AOT) compiler]], which compiles a statically-typed Python-like language whose "syntax and semantics are nearly identical to Python's, there are some notable differences"<ref>{{Cite web |title=Codon: Differences with Python |url=https://docs.exaloop.io/codon/general/differences |url-status=live |archive-url=https://web.archive.org/web/20230525002540/https://docs.exaloop.io/codon/general/differences |archive-date=2023-05-25 |access-date=2023-08-28}}</ref> For example, Codon uses 64-bit machine integers for speed, not arbitrarily as with Python; Codon developers claim that speedups over CPython are usually on the order of ten to a hundred times. Codon compiles to machine code (via [[LLVM]]) and supports native multithreading.<ref>{{Cite web |last=Lawson |first=Loraine |date=2023-03-14 |title=MIT-Created Compiler Speeds up Python Code |url=https://thenewstack.io/mit-created-compiler-speeds-up-python-code/ |url-status=live |archive-url=https://web.archive.org/web/20230406054200/https://thenewstack.io/mit-created-compiler-speeds-up-python-code/ |archive-date=2023-04-06 |access-date=2023-08-28 |website=The New Stack |language=en-US}}</ref> <!-- It's compile has a restrictive BSL licence, but it doesn't affect generated code: --> Codon can also compile to Python extension modules that can be imported and used from Python.
* Pyston is a variant of the Python runtime that uses just-in-time compilation to speed up the execution of Python programs.<ref>{{cite web|url=https://www.infoworld.com/article/3587591/pyston-returns-from-the-dead-to-speed-python.html|title=Pyston returns from the dead to speed Python|last=Yegulalp|first=Serdar|date=29 October 2020|website=[[InfoWorld]]|access-date=26 January 2021|archive-date=27 January 2021|archive-url=https://web.archive.org/web/20210127113233/https://www.infoworld.com/article/3587591/pyston-returns-from-the-dead-to-speed-python.html|url-status=live}}</ref>
* Cinder[[MicroPython]] isand a[[CircuitPython]] performance-oriented fork of CPythonare Python&nbsp;3.8 variants that containsare aoptimized number of optimizations including bytecode inline caching, eager evaluation of coroutines, a method-at-a-timefor [[Just-in-time compilation|JITmicrocontroller]]s, andincluding anthe experimental[[Lego bytecodeMindstorms compilerEV3]].<ref>{{Cite web|url=https://githubeducation.lego.com/facebookincubatoren-us/cindersupport/mindstorms-ev3/python-for-ev3|title=cinder: Instagram's performance oriented forkPython-for-EV3|website=LEGO of CPython.Education|language=en|access-date=417 MayApril 2021|language=en2019|archive-date=47 MayJune 20212020|archive-url=https://web.archive.org/web/2021050411250020200607234814/https://githubeducation.lego.com/facebookincubatoren-us/cindersupport/mindstorms-ev3/python-for-ev3|url-status=live}}</ref>
* Pyston is a variant of the Python runtime that uses just-in-time compilation to speed up execution of Python programs.<ref>{{cite news|url=https://www.infoworld.com/article/3587591/pyston-returns-from-the-dead-to-speed-python.html|title=Pyston returns from the dead to speed Python|last=Yegulalp|first=Serdar|date=29 October 2020|website=[[InfoWorld]]|access-date=26 January 2021|archive-date=27 January 2021|archive-url=https://web.archive.org/web/20210127113233/https://www.infoworld.com/article/3587591/pyston-returns-from-the-dead-to-speed-python.html|url-status=live}}</ref>
*python not provide stable connectivity python provide weak connectivity but [https://www.codeexampler.com/python-function max function in python] By CodeExampler Learn Python For Free and Python Based on High Level object-oriented programming Language Concepts
* Cinder is a performance-oriented fork of CPython 3.8 that features a number of optimizations, including bytecode inline caching, eager evaluation of coroutines, a method-at-a-time [[Just-in-time compilation|JIT]], and an experimental bytecode compiler.<ref>{{Cite web|url=https://github.com/facebookincubator/cinder|title=cinder: Instagram's performance-oriented fork of CPython.|website=[[GitHub]]|access-date=4 May 2021|language=en|archive-date=4 May 2021|archive-url=https://web.archive.org/web/20210504112500/https://github.com/facebookincubator/cinder|url-status=live}}</ref>
* The Snek<!-- (previously named Newt) --><ref>{{Cite web |last=Aroca |first=Rafael |date=2021-08-07 |title=Snek Lang: feels like Python on Arduinos |url=https://rafaelaroca.wordpress.com/2021/08/07/snek-lang-feels-like-python-on-arduinos/ |access-date=2024-01-04 |website=Yet Another Technology Blog |language=en |archive-date=5 January 2024 |archive-url=https://web.archive.org/web/20240105001031/https://rafaelaroca.wordpress.com/2021/08/07/snek-lang-feels-like-python-on-arduinos/ |url-status=live}}</ref><ref>{{Cite web |last=Aufranc (CNXSoft) |first=Jean-Luc |date=2020-01-16 |title=Snekboard Controls LEGO Power Functions with CircuitPython or Snek Programming Languages (Crowdfunding) – CNX Software |url=https://www.cnx-software.com/2020/01/16/snekboard-controls-lego-power-functions-with-circuitpython-or-snek-programming-languages/ |access-date=2024-01-04 |website=CNX Software – Embedded Systems News |language=en-US |archive-date=5 January 2024 |archive-url=https://web.archive.org/web/20240105001031/https://www.cnx-software.com/2020/01/16/snekboard-controls-lego-power-functions-with-circuitpython-or-snek-programming-languages/ |url-status=live}}</ref><ref>{{Cite web |last=Kennedy (@mkennedy) |first=Michael |title=Ready to find out if you're git famous? |url=https://pythonbytes.fm/episodes/show/187/ready-to-find-out-if-youre-git-famous |access-date=2024-01-04 |website=pythonbytes.fm |language=en-US |archive-date=5 January 2024 |archive-url=https://web.archive.org/web/20240105001031/https://pythonbytes.fm/episodes/show/187/ready-to-find-out-if-youre-git-famous |url-status=live}}</ref><!-- https://keithp.com/blogs/newt-lola/ https://bipes.net.br/snek-web-uploader/ --> embedded computing language "is Python-inspired, but it is not Python. It is possible to write Snek programs that run under a full Python system, but most Python programs will not run under Snek."<ref>{{Cite web |last=Packard |first=Keith |date=2022-12-20 |title=The Snek Programming Language: A Python-inspired Embedded Computing Language |url=https://sneklang.org/doc/snek.pdf |access-date=4 January 2024 |archive-date=4 January 2024 |archive-url=https://web.archive.org/web/20240104162458/https://sneklang.org/doc/snek.pdf |url-status=live}}</ref> Snek is compatible with 8-bit [[AVR microcontrollers]] such as [[ATmega|ATmega 328P]]-based Arduino, as well as larger microcontrollers that are compatible with [[MicroPython]]. Snek is an imperative language that (unlike Python) omits [[object-oriented programming]]. Snek supports only one numeric data type, which features 32-bit [[single-precision|single precision]] (resembling [[JavaScript]] numbers, though smaller).<!-- "Snek is a tiny embeddable language targeting processors with only a few kB of flash and ram. Think of something that would have been running BASIC years ago and you'll have the idea. These processors are too small to run MicroPython." "Snekboard is a custom embedded computer designed to run Snek or CircuitPython." -->
 
===Unsupported implementations===
[[Stackless Python]] is a significant fork of CPython that implements [[microthread]]s. This implementation uses the [[call stack]] differently, thus allowing massively concurrent programs. PyPy also offers a stackless version.<ref name="AutoNT-73"/>
Other just-in-time Python compilers have been developed, but are now unsupported:
 
* Google began a project named [[Unladen Swallow]] in 2009, with the aim of speeding up the Python interpreter fivefold by using the [[LLVM]], and of improving its multithreading ability to scale to thousands of cores,<ref name="AutoNT-74" /> while ordinary implementations suffer from the [[global interpreter lock]].
Just-in-time Python compilers have been developed, but are now unsupported:
* [[Psyco]] is a discontinued [[Just-in-time compilation|just-in-time]] [[run-time algorithm specialization|specializing]] compiler that integrates with CPython and transforms bytecode to machine code at runtime. The emitted code is specialized for certain [[data type]]s and is faster than the standard Python code. Psyco does not support Python&nbsp;2.7 or later.
* Google began a project named [[Unladen Swallow]] in 2009: this project aimed to speed up the Python interpreter five-fold by using [[LLVM]], and improve [[multithreading (computer architecture)|multithreading]] capability for scaling to thousands of cores,<ref name="AutoNT-74"/> while typical implementations are limited by the [[global interpreter lock]].
* [[PyS60]] was a Python&nbsp;2 interpreter for [[Series 60]] mobile phones released by [[Nokia]] in 2005. It implemented many of the modules from the standard library and some additional modules for integrating with the [[Symbian]] operating system. The Nokia [[N900]] also supports Python with [[GTK]] widget libraries, enabling programs to be written and run on the target device.<ref>{{cite web|title=Python on the Nokia N900|url=http://www.stochasticgeometry.ie/2010/04/29/python-on-the-nokia-n900/|website=Stochastic Geometry|date=29 April 2010|access-date=9 July 2015|archive-date=20 June 2019|archive-url=https://web.archive.org/web/20190620000053/http://www.stochasticgeometry.ie/2010/04/29/python-on-the-nokia-n900/|url-status=live}}</ref>
* [[Psyco]] is a discontinued [[just-in-time compilation|just-in-time]] [[run-time algorithm specialization|specializing]] compiler, which integrates with CPython and transforms bytecode to machine code at runtime. The emitted code is specialized for certain [[data type]]s and is faster than standard Python code. Psyco does not support Python&nbsp;2.7 or later.
* [[PyS60]] was a Python&nbsp;2 interpreter for [[Series 60]] mobile phones, which was released by [[Nokia]] in 2005. The interpreter implemented many modules from Python's standard library, as well as additional modules for integration with the [[Symbian]] operating system. The Nokia [[N900]] also supports Python through the [[GTK]] widget library, allowing programs to be written and run on the target device.<ref>{{cite web|title=Python on the Nokia N900|url=http://www.stochasticgeometry.ie/2010/04/29/python-on-the-nokia-n900/|website=Stochastic Geometry|date=29 April 2010|access-date=9 July 2015|archive-date=20 June 2019|archive-url=https://web.archive.org/web/20190620000053/http://www.stochasticgeometry.ie/2010/04/29/python-on-the-nokia-n900/|url-status=live}}</ref>
 
===Cross-compilers to other languages===
There are several compilers/[[transpiler]]s to high-level [[object languages; the source language]]s, with eitheris unrestricted Python, a restricted subset of Python, or a language similar to Python as the source language:
* Brython,<ref>{{Cite web|title=Brython|url=https://brython.info/|access-date=2021-01-21|website=brython.info|archive-date=3 August 2018|archive-url=https://web.archive.org/web/20180803065954/http://brython.info/|url-status=live}}</ref> Transcrypt,<ref>{{cite web|title=Transcrypt – Python in the browser|url=https://www.transcrypt.org|access-date=22 December 2020|website=transcrypt.org|language=en|archive-date=19 August 2018|archive-url=https://web.archive.org/web/20180819133303/http://www.transcrypt.org/|url-status=live}}</ref><ref>{{Cite web|url=https://www.infoq.com/articles/transcrypt-python-javascript-compiler/|title=Transcrypt: Anatomy of a Python to JavaScript Compiler|website=InfoQ|access-date=20 January 2021|archive-date=5 December 2020|archive-url=https://web.archive.org/web/20201205193339/https://www.infoq.com/articles/transcrypt-python-javascript-compiler/|url-status=live}}</ref> and [[Pyjs]] compile Python to [[JavaScript]]. (The latest release of Pyjs was in 2012.)
* [[Cython]] compiles (a superset of) Python&nbsp;2.7 to C (while the resulting code is also usable with Python&nbsp;3 and also e.g. C++).
* [[Cython]] compiles a superset of Python<!-- actually 2.7 by default, but Python 3 by override --> to C. The resulting code can be used with Python via direct C-level API calls into the Python interpreter.
* [[Nuitka]] compiles Python into C++.<ref>{{cite web|title=Nuitka Home {{!}} Nuitka Home|url=http://nuitka.net/|access-date=18 August 2017|website=nuitka.net|language=en|archive-date=30 May 2020|archive-url=https://web.archive.org/web/20200530211233/https://nuitka.net/|url-status=live}}</ref>
* PyJL compiles/transpiles a subset of Python to "human-readable, maintainable, and high-performance Julia source code".<ref name=PyJL>{{Cite web|title=Transpiling Python to Julia using PyJL|url=https://web.ist.utl.pt/antonio.menezes.leitao/ADA/documents/publications_docs/2022_TranspilingPythonToJuliaUsingPyJL.pdf|quote=After manually modifying one line of code by specifying the necessary type information, we obtained a speedup of 52.6×, making the translated Julia code 19.5× faster than the original Python code.|access-date=20 September 2023|archive-date=19 November 2023|archive-url=https://web.archive.org/web/20231119071525/https://web.ist.utl.pt/antonio.menezes.leitao/ADA/documents/publications_docs/2022_TranspilingPythonToJuliaUsingPyJL.pdf|url-status=live}}</ref> Despite the developers' performance claims, this is not possible for ''arbitrary'' Python code; that is, compiling to a faster language or machine code is known to be impossible in the general case. The semantics of Python might potentially be changed, but in many cases speedup is possible with few or no changes in the Python code. The faster Julia source code can then be used from Python or compiled to machine code.
* Pythran compiles a subset of Python&nbsp;3 to C++.<ref>{{Cite web|last=Borderies|first=Olivier|date=24 January 2019|title=Pythran: Python at C++ speed !|url=https://medium.com/@olivier.borderies/pythran-python-at-c-speed-518f26af60e8|website=Medium|access-date=25 March 2020|archive-date=25 March 2020|archive-url=https://web.archive.org/web/20200325171400/https://medium.com/@olivier.borderies/pythran-python-at-c-speed-518f26af60e8|url-status=live}}</ref><ref>{{Cite web|title=Pythran — Pythran 0.9.5 documentation|url=https://pythran.readthedocs.io/en/latest/|website=pythran.readthedocs.io|access-date=25 March 2020|archive-date=19 February 2020|archive-url=https://web.archive.org/web/20200219081337/https://pythran.readthedocs.io/en/latest/|url-status=live}}</ref><ref>{{Cite web |url=http://conference.scipy.org/proceedings/scipy2013/html/pdfs/guelton.pdf |title=Archived copy |access-date=20 January 2021 |archive-date=18 April 2021 |archive-url=https://web.archive.org/web/20210418005833/http://conference.scipy.org/proceedings/scipy2013/html/pdfs/guelton.pdf |url-status=live }}</ref>
* [[Nuitka]] compiles Python into C<!-- "is the optimizing Python compiler written in Python that creates executables that run without a separate installer"-->.<ref>{{cite web|title=Nuitka Home {{!}} Nuitka Home|url=http://nuitka.net/|access-date=18 August 2017|website=nuitka.net|language=en|archive-date=30 May 2020|archive-url=https://web.archive.org/web/20200530211233/https://nuitka.net/|url-status=live}}</ref> This compiler works with Python 3.4 to 3.12 (and 2.6 and 2.7) for Python's main supported platforms (and Windows 7 or even Windows XP) and for Android. The compiler developers claim full support for Python 3.10, <!-- "also finishes full compatibility with the match statements of 3.10" "From here on, we need to re-visit compatibility. A few more obscured 3.10 features are missing, the 3.11 compatibility is not yet complete" -->partial support for Python 3.11 and 3.12, <!-- "This release bumps the long-awaited 3.12 support to a complete level. Now, Nuitka behaves identically to CPython 3.12 for the most part. .. After being late with 3.12 support, we will now be early with 3.13 support if all goes well." --> and experimental support for Python 3.13. Nuitka supports macOS including Apple Silicon-based versions. <!-- "While arm64 (M1) only builds and x86_64 (Intel) only builds work, the value universal which of course implies twice the size, and as such has other disadvantages, is not yet supported. --> The compiler is free of cost, though it has commercial add-ons (e.g., for hiding source code).<!-- "Container Builds (public + commercial)" -->
* [[Pyrex (programming language)|Pyrex]] (latest release in 2010) and [[Shed Skin]] (latest release in 2013) compile to C and C++ respectively.
* [[Numba]] is a JIT compiler that is used from Python; the compiler translates a subset of Python and NumPy code into fast machine code. This tool is enabled by adding a decorator to the relevant Python code.
* Google's Grumpy (latest release in 2017) [[transpile]]s Python&nbsp;2 to [[Go (programming language)|Go]].<ref>{{Cite web|url=https://github.com/google/grumpy|title=google/grumpy|date=10 April 2020|via=GitHub|access-date=25 March 2020|archive-date=15 April 2020|archive-url=https://web.archive.org/web/20200415054919/https://github.com/google/grumpy|url-status=live}}</ref><ref>{{Cite web|url=https://opensource.google/projects/|title=Projects|website=opensource.google|access-date=25 March 2020|archive-date=24 April 2020|archive-url=https://web.archive.org/web/20200424191248/https://opensource.google/projects/|url-status=live}}</ref><ref>{{Cite web|url=https://www.theregister.com/2017/01/05/googles_grumpy_makes_python_go/|title=Google's Grumpy code makes Python Go|first=Thomas Claburn in San|last=Francisco|website=www.theregister.com|access-date=20 January 2021|archive-date=7 March 2021|archive-url=https://web.archive.org/web/20210307165521/https://www.theregister.com/2017/01/05/googles_grumpy_makes_python_go/|url-status=live}}</ref>
* Pythran compiles a subset of Python&nbsp;3 to C++ ([[C++11]]).<ref name="Guelton Brunet Amini Merlini 2015 p=014001">{{cite journal |last1=Guelton |first1=Serge |last2=Brunet |first2=Pierrick |last3=Amini |first3=Mehdi |last4=Merlini |first4=Adrien |last5=Corbillon |first5=Xavier |last6=Raynaud |first6=Alan |title=Pythran: enabling static optimization of scientific Python programs |journal=Computational Science & Discovery |publisher=IOP Publishing |volume=8 |issue=1 |date=16 March 2015 |issn=1749-4699 |doi=10.1088/1749-4680/8/1/014001|doi-access=free |page=014001 |bibcode=2015CS&D....8a4001G}}</ref>
* [[IronPython]] (now abandoned by Microsoft) allows running Python&nbsp;2.7 programs on the .NET [[Common Language Runtime]].<ref>{{Cite web|title=IronPython.net /|url=https://ironpython.net/|access-date=2021-04-22|website=ironpython.net|archive-date=17 April 2021|archive-url=https://web.archive.org/web/20210417064418/https://ironpython.net/|url-status=live}}</ref>
* [[RPython]] can be compiled to C, and it is used to build the PyPy interpreter for Python.
* [[Jython]] compiles Python&nbsp;2.7 to Java bytecode, allowing the use of the Java libraries from a Python program.<ref>{{Cite web|title=Jython FAQ|url=https://www.jython.org/jython-old-sites/archive/22/userfaq.html|access-date=2021-04-22|website=www.jython.org|archive-date=22 April 2021|archive-url=https://web.archive.org/web/20210422055726/https://www.jython.org/jython-old-sites/archive/22/userfaq.html|url-status=live}}</ref>
* The Python → 11l → C++ transpiler<ref>{{Cite web |url=https://11l-lang.org/transpiler |title=The Python → 11l → C++ transpiler |access-date=17 July 2022 |archive-date=24 September 2022 |archive-url=https://web.archive.org/web/20220924233728/https://11l-lang.org/transpiler/ |url-status=live}}</ref> compiles a subset of Python&nbsp;3 to C++ ([[C++17]]).
* [[MyHDL]] is a Python-based [[hardware description language]] (HDL), that converts MyHDL code to [[Verilog]] or [[VHDL]] code.
 
* [[Numba]] uses LLVM to compile a subset of Python to machine code.
There are also specialized compilers:
* Brython,<ref>{{Cite web|title=Brython|url=https://brython.info/|access-date=2021-01-21|website=brython.info|archive-date=3 August 2018|archive-url=https://web.archive.org/web/20180803065954/http://brython.info/|url-status=live}}</ref> Transcrypt<ref>{{cite web|title=Transcrypt - Python in the browser|url=https://www.transcrypt.org|access-date=22 December 2020|website=transcrypt.org|language=en|archive-date=19 August 2018|archive-url=https://web.archive.org/web/20180819133303/http://www.transcrypt.org/|url-status=live}}</ref><ref>{{Cite web|url=https://www.infoq.com/articles/transcrypt-python-javascript-compiler/|title=Transcrypt: Anatomy of a Python to JavaScript Compiler|website=InfoQ|access-date=20 January 2021|archive-date=5 December 2020|archive-url=https://web.archive.org/web/20201205193339/https://www.infoq.com/articles/transcrypt-python-javascript-compiler/|url-status=live}}</ref> and [[Pyjs]] (latest release in 2012) compile Python to [[JavaScript]].
* [[MyHDL]] is a Python-based [[hardware description language]] (HDL) that converts MyHDL code to [[Verilog]] or [[VHDL]] code.
* [[RPython]] can be compiled to C, and is used to build the PyPy interpreter of Python.
 
Some older projects existed, as well as compilers not designed for use with Python 3.x and related syntax:
* Google's Grumpy [[transpile]]s Python&nbsp;2 to [[Go (programming language)|Go]].<ref>{{Cite web|url=https://github.com/google/grumpy|title=google/grumpy|date=10 April 2020|via=GitHub|access-date=25 March 2020|archive-date=15 April 2020|archive-url=https://web.archive.org/web/20200415054919/https://github.com/google/grumpy|url-status=live}}</ref><ref>{{Cite web|url=https://opensource.google/projects/|title=Projects|website=opensource.google|access-date=25 March 2020|archive-date=24 April 2020|archive-url=https://web.archive.org/web/20200424191248/https://opensource.google/projects/|url-status=live}}</ref><ref>{{Cite news|url=https://www.theregister.com/2017/01/05/googles_grumpy_makes_python_go/|title=Google's Grumpy code makes Python Go|first=Thomas Claburn in San|last=Francisco|website=www.theregister.com|access-date=20 January 2021|archive-date=7 March 2021|archive-url=https://web.archive.org/web/20210307165521/https://www.theregister.com/2017/01/05/googles_grumpy_makes_python_go/|url-status=live}}</ref> The latest release was in 2017.
* [[IronPython]]<!-- (abandoned by Microsoft) --> allows running Python&nbsp;2.7 programs with the .NET [[Common Language Runtime]].<ref>{{Cite web|title=IronPython.net /|url=https://ironpython.net/|website=ironpython.net|archive-date=17 April 2021|archive-url=https://web.archive.org/web/20210417064418/https://ironpython.net/|url-status=live}}</ref> An [[Software release life cycle#Alpha|alpha]] version (released in 2021), is available for "Python&nbsp;3.4, although features and behaviors from later versions may be included."<ref>{{Cite web |url=https://github.com/IronLanguages/ironpython3 |title=GitHub – IronLanguages/ironpython3: Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime<!-- Bot generated title --> |website=[[GitHub]] |archive-date=28 September 2021 |archive-url=https://web.archive.org/web/20210928101250/https://github.com/IronLanguages/ironpython3 |url-status=live}}</ref>
* [[Jython]] compiles Python&nbsp;2.7 to Java bytecode, allowing the use of Java libraries from a Python program.<ref>{{Cite web|title=Jython FAQ|url=https://www.jython.org/jython-old-sites/archive/22/userfaq.html|access-date=2021-04-22|website=www.jython.org|archive-date=22 April 2021|archive-url=https://web.archive.org/web/20210422055726/https://www.jython.org/jython-old-sites/archive/22/userfaq.html|url-status=live}}</ref>
* [[Pyrex (programming language)|Pyrex]] (last released in 2010) and [[Shed Skin]] (last released in 2013) compile to C and C++ respectively.
 
===Performance===
A performance comparison ofamong various Python implementations, onusing a non-numerical (combinatorial) workload, was presented at EuroSciPy '13.<ref>{{cite conference |title=Performance of Python runtimes on a non-numeric scientific code |last=Murri |first=Riccardo |conference=European Conference on Python in Science (EuroSciPy) |year=2013 |arxiv=1404.6388|bibcode=2014arXiv1404.6388M }}</ref> In addition, Python's performance comparedrelative to other programming languages is also benchmarked by [[The Computer Language Benchmarks Game]].<ref>{{cite web|title=The Computer Language Benchmarks Game|url=https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python.html|access-date=30 April 2020|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614210246/https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python.html|url-status=live}}</ref>
 
There are several approaches to optimizing Python performance, given the inherent slowness of an [[interpreted language]]. These approaches include the following strategies or tools:
==Development==
Python's development is conducted largely through the ''Python Enhancement Proposal'' (PEP) process, the primary mechanism for proposing major new features, collecting community input on issues and documenting Python design decisions.<ref name="PepCite000" /> Python coding style is covered in PEP&nbsp;8.<ref>{{cite web|url=https://www.python.org/dev/peps/pep-0008/|title=PEP 8 -- Style Guide for Python Code|website=Python.org|access-date=26 March 2019|archive-date=17 April 2019|archive-url=https://web.archive.org/web/20190417223549/https://www.python.org/dev/peps/pep-0008/|url-status=live}}</ref> Outstanding PEPs are reviewed and commented on by the Python community and the steering council.<ref name="PepCite000" />
 
* [[Just-in-time compilation]]: Dynamically compiling Python code just before it is executed. This technique is used in libraries such as [[Numba]] and [[PyPy]].
Enhancement of the language corresponds with development of the CPython reference implementation. The mailing list python-dev is the primary forum for the language's development. Specific issues are discussed in the [[Roundup (issue tracker)|Roundup]] [[bug tracker]] hosted at [https://bugs.python.org bugs.python.org].<ref name="AutoNT-21" /> Development originally took place on a [[Self-hosting (web services)|self-hosted]] source-code repository running [[Mercurial]], until Python moved to [[GitHub]] in January 2017.<ref name=py_dev_guide>{{Cite web|url=https://devguide.python.org/|title=Python Developer's Guide — Python Developer's Guide|website=devguide.python.org|access-date=17 December 2019|archive-date=9 November 2020|archive-url=https://web.archive.org/web/20201109032501/https://devguide.python.org/|url-status=live}}</ref>
* [[Compiler|Static compilation]]: Python code is compiled into machine code sometime before execution. An example of this approach is Cython, which compiles Python into C.
* Concurrency and parallelism: Multiple tasks can be run simultaneously. Python contains modules such as `multiprocessing` to support this form of parallelism. Moreover, this approach helps to overcome limitations of the [[Global interpreter lock|Global Interpreter Lock]] (GIL) in CPU tasks.
* Efficient data structures: Performance can also be improved by using data types such as <code>Set</code> for membership tests, or <code>deque</code> from <code>collections</code> for [[Queueing theory|queue]] operations.
 
==Language Development==
CPython's public releases come in three types, distinguished by which part of the version number is incremented:
Python's development is conducted largely through the ''Python Enhancement Proposal'' (PEP) process; this process is the primary mechanism for proposing major new features, collecting community input on issues, and documenting Python design decisions.<ref name="PepCite000"/> Python coding style is covered in PEP&nbsp;8.<ref>{{cite web|url=https://www.python.org/dev/peps/pep-0008/|title=PEP 8 – Style Guide for Python Code|website=Python.org|access-date=26 March 2019|archive-date=17 April 2019|archive-url=https://web.archive.org/web/20190417223549/https://www.python.org/dev/peps/pep-0008/|url-status=live}}</ref> Outstanding PEPs are reviewed and commented on by the Python community and the steering council.<ref name="PepCite000"/>
* Backward-incompatible versions, where code is expected to break and needs to be manually [[ported]]. The first part of the version number is incremented. These releases happen infrequently—version 3.0 was released 8 years after 2.0.
* Major or "feature" releases, occurred about every 18 months but with the adoption of a yearly release cadence starting with Python&nbsp;3.9 are expected to happen once a year.<ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0602/|title=PEP 602 -- Annual Release Cycle for Python|website=Python.org|language=en|access-date=6 November 2019|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614202755/https://www.python.org/dev/peps/pep-0602/|url-status=live}}</ref><ref>{{Cite web|url=https://lwn.net/Articles/802777/|title=Changing the Python release cadence [LWN.net]|website=lwn.net|access-date=6 November 2019|archive-date=6 November 2019|archive-url=https://web.archive.org/web/20191106170153/https://lwn.net/Articles/802777/|url-status=live}}</ref> They are largely compatible but introduce new features. The second part of the version number is incremented. Each major version is supported by bugfixes for several years after its release.<ref name="release-schedule" />
* Bugfix releases,<ref name="AutoNT-22" /> which introduce no new features, occur about every 3 months and are made when a sufficient number of bugs have been fixed upstream since the last release. Security vulnerabilities are also patched in these releases. The third and final part of the version number is incremented.<ref name="AutoNT-22" />
 
Enhancement of the language corresponds with development of the CPython reference implementation. The mailing list python-dev is the primary forum for the language's development. Specific issues were originally discussed in the [[Roundup (issue tracker)|Roundup]] [[bug tracker]] hosted by the foundation.<ref name="AutoNT-21"/> In 2022, all issues and discussions were migrated to [[GitHub]].<ref>{{cite web |url=https://lwn.net/Articles/885854/ |title=Moving Python's bugs to GitHub &#91;LWN.net&#93; |access-date=2 October 2022 |archive-date=2 October 2022 |archive-url=https://web.archive.org/web/20221002183818/https://lwn.net/Articles/885854/ |url-status=live}}</ref> Development originally took place on a [[Self-hosting (web services)|self-hosted]] source-code repository running [[Mercurial]], until Python moved to [[GitHub]] in January 2017.<ref name=py_dev_guide>{{Cite web|url=https://devguide.python.org/|title=Python Developer's Guide – Python Developer's Guide|website=devguide.python.org|access-date=17 December 2019|archive-date=9 November 2020|archive-url=https://web.archive.org/web/20201109032501/https://devguide.python.org/|url-status=live}}</ref>
Many [[beta release|alpha, beta, and release-candidates]] are also released as previews and for testing before final releases. Although there is a rough schedule for each release, they are often delayed if the code is not ready. Python's development team monitors the state of the code by running the large [[unit test]] suite during development.<ref name="AutoNT-23" />
 
CPython's public releases have three types, distinguished by which part of the version number is incremented:
The major [[academic conference]] on Python is [[PyCon]]. There are also special Python mentoring programmes, such as [[Pyladies]].
* ''Backward-incompatible versions'', where code is expected to break and must be manually [[ported]]. The first part of the version number is incremented. These releases happen infrequently—version 3.0 was released 8 years after 2.0. According to Guido van Rossum, a version 4.0 will probably never exist.<ref>{{Cite web |last=Hughes |first=Owen |date=2021-05-24 |title=Programming languages: Why Python 4.0 might never arrive, according to its creator |url=https://www.techrepublic.com/article/programming-languages-why-python-4-0-will-probably-never-arrive-according-to-its-creator/ |access-date=2022-05-16 |website=TechRepublic |language=en-US |archive-date=14 July 2022 |archive-url=https://web.archive.org/web/20220714201302/https://www.techrepublic.com/article/programming-languages-why-python-4-0-will-probably-never-arrive-according-to-its-creator/ |url-status=live}}</ref>
* ''Major or "feature" releases'' are largely compatible with the previous version but introduce new features. The second part of the version number is incremented. Starting with Python&nbsp;3.9, these releases are expected to occur annually.<ref>{{Cite web|url=https://www.python.org/dev/peps/pep-0602/|title=PEP 602 – Annual Release Cycle for Python|website=Python.org|language=en|access-date=6 November 2019|archive-date=14 June 2020|archive-url=https://web.archive.org/web/20200614202755/https://www.python.org/dev/peps/pep-0602/|url-status=live}}</ref><ref>{{Cite web|url=https://lwn.net/Articles/802777/|title=Changing the Python release cadence [LWN.net]|website=lwn.net|access-date=6 November 2019|archive-date=6 November 2019|archive-url=https://web.archive.org/web/20191106170153/https://lwn.net/Articles/802777/|url-status=live}}</ref> Each major version is supported by bug fixes for several years after its release.<ref name="release-schedule"/>
* ''Bug fix releases'',<ref name="AutoNT-22"/> which introduce no new features, occur approximately every three months; these releases are made when a sufficient number of bugs have been fixed [[Upstream (software development)|upstream]] since the last release. Security vulnerabilities are also patched in these releases. The third and final part of the version number is incremented.<ref name="AutoNT-22"/>
 
Many [[beta release|alpha, beta, and release-candidates]] are also released as previews and for testing before final releases. Although there is a rough schedule for releases, they are often delayed if the code is not ready yet. Python's development team monitors the state of the code by running a large [[unit test]] suite during development.<ref name="AutoNT-23"/>
Pythons&nbsp;3.10 deprecates wstr (to be removed in Python&nbsp;3.12; meaning Python extensions<ref>{{Cite web|title=1. Extending Python with C or C++ — Python 3.9.1 documentation|url=https://docs.python.org/3/extending/extending.html|access-date=2021-02-14|website=docs.python.org|archive-date=23 June 2020|archive-url=https://web.archive.org/web/20200623232830/https://docs.python.org/3/extending/extending.html|url-status=live}}</ref> need to be modified by then),<ref>{{Cite web|title=PEP 623 -- Remove wstr from Unicode|url=https://www.python.org/dev/peps/pep-0623/|access-date=2021-02-14|website=Python.org|language=en|archive-date=5 March 2021|archive-url=https://web.archive.org/web/20210305153214/https://www.python.org/dev/peps/pep-0623/|url-status=live}}</ref> and also plans to add [[pattern matching]] to the language.<ref>{{Cite web|title=PEP 634 -- Structural Pattern Matching: Specification|url=https://www.python.org/dev/peps/pep-0634/|access-date=2021-02-14|website=Python.org|language=en|archive-date=6 May 2021|archive-url=https://web.archive.org/web/20210506005315/https://www.python.org/dev/peps/pep-0634/|url-status=live}}</ref>
 
The major [[academic conference]] on Python is [[PyCon]]. There are also special Python mentoring programs, such as [[PyLadies]].
 
==API documentation generators==
Tools that can generate documentation for Python [[API]] include [[pydoc]] (available as part of the standard library),; [[Sphinx (documentation generator)|Sphinx]],; and [[Pdoc]] and its forks, [[Doxygen]] and [[Graphviz]], among others.<ref>{{Cite web |title=Documentation Tools |url=https://wiki.python.org/moin/DocumentationTools |access-date=2021-03-22 |website=Python.org |language=en |archive-date=11 November 2020 |archive-url=https://web.archive.org/web/20201111173635/https://wiki.python.org/moin/DocumentationTools |url-status=live }}</ref>
 
==Naming==
Python's name is derivedinspired fromby the British comedy group [[Monty Python]], whom Python creator Guido van Rossum enjoyed while developing the language. Monty Python references appear frequently in Python code and culture;<ref name="tutorial-chapter1" /> for example, the [[metasyntactic variable]]s often used in Python literature are [[Spam (Monty Python)|''spam'' and ''eggs'']], insteadrather ofthan the traditional [[foobar|''foo'' and ''bar'']].<ref name="tutorial-chapter1" /><ref name="AutoNT-26" /> The official Python documentation also contains various references to Monty Python routines.<ref>{{cite book |last1=Lutz |first1=Mark |title=Learning Python: Powerful Object-Oriented Programming |year=2009 |publisher=O'Reilly Media, Inc. |isbn=9781449379322 |page=17 |url=https://books.google.com/books?id=1HxWGezDZcgC&pg=PA17 |language=en |access-date=9 May 2017 |archive-date=17 July 2017 |archive-url=https://web.archive.org/web/20170717044012/https://books.google.com/books?id=1HxWGezDZcgC&pg=PA17 |url-status=live }}</ref><ref>{{cite book |last1=Fehily |first1=Chris |title=Python |year=2002 |publisher=Peachpit Press |isbn=9780201748840 |page=xv |url=https://books.google.com/books?id=carqdIdfVlYC&pg=PR15 |language=en |access-date=9 May 2017 |archive-date=17 July 2017 |archive-url=https://web.archive.org/web/20170717044040/https://books.google.com/books?id=carqdIdfVlYC&pg=PR15 |url-status=live}}</ref> Python users are sometimes referred to as "Pythonistas".<ref name="introducing_python">{{Cite book |publisher=Sebastopol, CA : O'Reilly Media |isbn=978-1-4493-5936-2 |last=Lubanovic |first=Bill |title=Introducing Python |access-date=2023-07-31 |date=2014 |url=http://archive.org/details/introducingpytho0000luba |page=305}}</ref>
 
The prefix[[affix]] ''Py-'' is often used towhen shownaming thatPython somethingapplications isor relatedlibraries. toSome Python.examples Examples ofinclude the use of this prefix in names of Python applications or libraries includefollowing:

* [[Pygame]], a [[language binding|binding]] of [[Simple DirectMedia Layer|SDL]] to Python (commonly used to create games);
* [[PyQt]] and [[PyGTK]], which bind [[Qt (software)|Qt]] and GTK to Python respectively; and
* [[PyPy]], a Python implementation originally written in Python.;
* [[NumPy]], a Python library for numerical processing.
* [[Jupyter]], a [[notebook interface]] and associated project for interactive computing
 
==Popularity==
Since 2003, Python has consistently ranked in the top ten of the most popular programming languages in the [[TIOBE Programming Community Index]] where,; {{as of|20212022|212|lc=y}}, itPython iswas the third most popular language (behind [[Java (programming language)|Java]], and C).<ref>{{cite web |urlname=http:tiobecurrent//www.tiobe.com/tiobe-index/ |title=TIOBE Index |publisher=TIOBE - The Software Quality Company |access-date=26 February 2021 |archive-date=14 June 2020 |archive-url=https://web.archive.org/web/20200614043624/https://www.tiobe.com/tiobe-index/ |url-status=live }}</ref> ItPython was selected as Programming Language of the Year (for "the highest rise in ratings in a year") in 2007, 2010, 2018, 2020, 2021, and 20202024 (the—the only language to dohave done so foursix times {{as of|2025|lc=true}}<ref>{{Cite web|last=Blake|first=Author Troy|date=20212025-0108-1830 |title=TIOBE Index for JanuaryAugust 2025 2021|url=https://seniordbawww.wordpresstiobe.com/2021/01/18/tiobe-index-for-january-2021/ |access-date=20212025-0208-2630 |websitelanguage=Technologyen}}</ref>). NewsIn the TIOBE Index, monthly rankings are based on the volume of searches for programming languages on Google, Amazon, Wikipedia, Bing, and Information20 byother platforms. According to the accompanying graph, Python has shown a marked upward trend since the early 2000s, eventually passing more established languages such as C, C++, and Java. This trend can be attributed to Python's readable syntax, comprehensive standard library, and application in data science and machine learning fields.<ref>{{Cite web SeniorDBA|languagetitle=en|archive-date=21TIOBE MarchIndex 2021|archive-url=https://webwww.archive.org/web/20210321143253/https://seniordba.wordpresstiobe.com/2021/01/18/tiobe-index/ |access-fordate=2025-january03-2021/31 |urlwebsite=TIOBE |language=en-status=liveUS}}</ref>).<ref name="AutoNT-34" />
[[File:Tiobeindex.png|thumb|TIOBE Index Chart showing Python's popularity compared to other programming languages]]
 
Large organizations that use Python include [[Wikipedia]], [[Google]],<ref name="quotes-about-python"/> [[Yahoo!]],<ref name="AutoNT-29"/> [[CERN]],<ref name="AutoNT-30"/> [[NASA]],<ref name="AutoNT-31"/> [[Facebook]],<ref>{{Cite web|url=https://developers.facebook.com/blog/post/301|title=Tornado: Facebook's Real-Time Web Framework for Python – Facebook for Developers|website=Facebook for Developers|language=en-US|access-date=19 June 2018|archive-date=19 February 2019|archive-url=https://web.archive.org/web/20190219031313/https://developers.facebook.com/blog/post/301|url-status=live}}</ref> [[Amazon (company)|Amazon]], [[Instagram]],<ref>{{cite web |url=https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad |title=What Powers Instagram: Hundreds of Instances, Dozens of Technologies |date=11 December 2016 |publisher=Instagram Engineering |access-date=27 May 2019 |archive-date=15 June 2020 |archive-url=https://web.archive.org/web/20200615183410/https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad |url-status=live}}</ref> [[Spotify]],<ref>{{Cite web|url=https://labs.spotify.com/2013/03/20/how-we-use-python-at-spotify/|title=How we use Python at Spotify|website=Spotify Labs|language=en-US|access-date=25 July 2018|date=20 March 2013|archive-date=10 June 2020|archive-url=https://web.archive.org/web/20200610005143/https://labs.spotify.com/2013/03/20/how-we-use-python-at-spotify/|url-status=live}}</ref> and some smaller entities such as [[Industrial Light & Magic]]<ref name="AutoNT-32"/> and [[ITA Software|ITA]].<ref name="AutoNT-33"/> The social news networking site [[Reddit]] was developed mostly in Python.<ref>{{Citation|title=GitHub – reddit-archive/reddit: historical code from reddit.com.|url=https://github.com/reddit-archive/reddit|publisher=The Reddit Archives|access-date=20 March 2019|archive-date=1 June 2020|archive-url=https://web.archive.org/web/20200601104939/https://github.com/reddit-archive/reddit|url-status=live}}</ref> Organizations that partly use Python include [[Discord]]<ref>{{cite web | url=https://elixir-lang.org/blog/2020/10/08/real-time-communication-at-scale-with-elixir-at-discord/ | title=Real time communication at scale with Elixir at Discord | date=8 October 2020 }}</ref> and [[Baidu]].<ref>{{cite web | url=https://www.freelancinggig.com/blog/2018/07/05/what-programming-language-is-baidu-built-in/#:~:text=Even%20though%20Baidu%20has%20used,part%20JavaScript%20has%20been%20applied | title=What Programming Language is Baidu Built In? | date=5 July 2018 }}</ref>
 
==Types of use==
{{further|List of Python software}}
[[File:Python Powered.png|thumb|Software that is powered by Python]]
 
Python has many uses, including the following:
 
* [[Scripting language|Scripting]] for [[web application]]s
* Scientific computing
* [[Artificial intelligence]] and [[machine learning]] projects
* [[Graphical user interface]]s and [[desktop environment]]s
* Embedded scripting in software and hardware products
* Operating systems
* [[Information security]]
 
Python can serve as a scripting language for web applications, e.g., via the {{Not a typo|[[mod_wsgi]]}} module for the [[Apache webserver|Apache web server]].<ref name="AutoNT-35" /> With [[Web Server Gateway Interface]], a standard API has evolved to facilitate these applications. [[Web framework]]s such as [[Django (web framework)|Django]], [[Pylons (web framework)|Pylons]], [[Pyramid (web framework)|Pyramid]], [[TurboGears]], [[web2py]], [[Tornado (web server)|Tornado]], [[Flask (web framework)|Flask]], Bottle, and [[Zope]] support developers in the design and maintenance of complex applications. Pyjs and [[IronPython]] can be used to develop the client-side of Ajax-based applications. [[SQLAlchemy]] can be used as a [[Data mapper pattern|data mapper]] to a relational database. [[Twisted (software)|Twisted]] is a framework to program communication between computers; this framework is used by [[Dropbox]], for example.
 
Libraries such as [[NumPy]], [[SciPy]] and [[Matplotlib]] allow the effective use of Python in scientific computing,<ref name="cise">{{cite journal |last=Oliphant |first=Travis |title=Python for Scientific Computing |journal=Computing in Science and Engineering |volume=9 |issue=3 |pages=10–20 |year=2007 |url=https://www.h2desk.com/blog/python-scientific-computing/ |doi=10.1109/MCSE.2007.58 |citeseerx=10.1.1.474.6460 |bibcode=2007CSE.....9c..10O |s2cid=206457124 |access-date=10 April 2015 |archive-date=15 June 2020 |archive-url=https://web.archive.org/web/20200615193226/https://www.h2desk.com/blog/python-scientific-computing/ |url-status=live| issn=1521-9615 }}</ref><ref name="millman">{{cite journal |first1=K. Jarrod |last1=Millman |first2=Michael |last2=Aivazis |title=Python for Scientists and Engineers |journal=Computing in Science and Engineering |volume=13 |number=2 |pages=9–12 |year=2011 |url=http://www.computer.org/csdl/mags/cs/2011/02/mcs2011020009.html |doi=10.1109/MCSE.2011.36 |bibcode=2011CSE....13b...9M |access-date=7 July 2014 |archive-date=19 February 2019 |archive-url=https://web.archive.org/web/20190219031439/https://www.computer.org/csdl/mags/cs/2011/02/mcs2011020009.html |url-status=live}}</ref> with specialized libraries such as [[Biopython]] and [[Astropy]] providing ___domain-specific functionality. [[SageMath]] is a [[computer algebra system]] with a [[notebook interface]] that is programmable in Python; the SageMath library covers many aspects of [[mathematics]], including [[algebra]], [[combinatorics]], [[numerical mathematics]], [[number theory]], and [[calculus]].<ref name="ICSE" >{{Citation|title=Science education with SageMath|url=http://visual.icse.us.edu.pl/methodology/why_Sage.html|publisher=Innovative Computing in Science Education|access-date=22 April 2019|archive-date=15 June 2020|archive-url=https://web.archive.org/web/20200615180428/http://visual.icse.us.edu.pl/methodology/why_Sage.html|url-status=dead}}</ref> [[OpenCV]] has Python bindings with a rich set of features for [[computer vision]] and [[image processing]].<ref>{{Cite web|title=OpenCV: OpenCV-Python Tutorials|url=https://docs.opencv.org/3.4.9/d6/d00/tutorial_py_root.html|access-date=2020-09-14|website=docs.opencv.org|archive-date=23 September 2020|archive-url=https://web.archive.org/web/20200923063145/https://docs.opencv.org/3.4.9/d6/d00/tutorial_py_root.html|url-status=live}}</ref>
 
Python is commonly used in artificial-intelligence and machine-learning projects, with support from libraries such as [[TensorFlow]], [[Keras]], [[Pytorch]], [[scikit-learn]] and [[ProbLog]] (a logic language).<ref name="whitepaper2015">{{cite web |last1=Dean |first1=Jeff |last2=Monga |first2=Rajat |first3=Sanjay |last3=Ghemawat |display-authors=2 |author-link1=Jeff Dean (computer scientist) |title=TensorFlow: Large-scale machine learning on heterogeneous systems |url=http://download.tensorflow.org/paper/whitepaper2015.pdf |website=TensorFlow.org |publisher=Google Research |access-date=10 November 2015 |date=9 November 2015 |archive-date=20 November 2015 |archive-url=https://web.archive.org/web/20151120004649/http://download.tensorflow.org/paper/whitepaper2015.pdf |url-status=live}}</ref><ref>{{cite web |last1=Piatetsky |first1=Gregory |title=Python eats away at R: Top Software for Analytics, Data Science, Machine Learning in 2018: Trends and Analysis |url=https://www.kdnuggets.com/2018/05/poll-tools-analytics-data-science-machine-learning-results.html/2 |website=KDnuggets |access-date=30 May 2018 |archive-date=15 November 2019 |archive-url=https://web.archive.org/web/20191115234216/https://www.kdnuggets.com/2018/05/poll-tools-analytics-data-science-machine-learning-results.html/2 |url-status=live}}</ref><ref>{{cite web|url=https://scikit-learn.org/stable/testimonials/testimonials.html|title=Who is using scikit-learn? – scikit-learn 0.20.1 documentation|website=scikit-learn.org|access-date=30 November 2018|archive-date=6 May 2020|archive-url=https://web.archive.org/web/20200506210716/https://scikit-learn.org/stable/testimonials/testimonials.html|url-status=live}}</ref><ref>{{cite web |author-link1=Norman Jouppi |last1=Jouppi |first1=Norm |title=Google supercharges machine learning tasks with TPU custom chip |url=https://cloudplatform.googleblog.com/2016/05/Google-supercharges-machine-learning-tasks-with-custom-chip.html |website=Google Cloud Platform Blog |access-date=19 May 2016 |archive-date=18 May 2016 |archive-url=https://web.archive.org/web/20160518201516/https://cloudplatform.googleblog.com/2016/05/Google-supercharges-machine-learning-tasks-with-custom-chip.html |url-status=live}}</ref><ref name="ProbLogConcepts">{{cite journal |last1=De Raedt |first1=Luc |last2=Kimmig|first2=Angelika |title=Probabilistic (logic) programming concepts |journal=Machine Learning |date=2015 |volume=100 |number=1 |pages=5–47 |doi=10.1007/s10994-015-5494-z |s2cid=3166992 |doi-access=free}}</ref> As a scripting language with a [[modular programming|modular architecture]], simple syntax, and rich text processing tools, Python is often used for [[natural language processing]].<ref name="AutoNT-47"/>
An empirical study found that scripting languages, such as Python, are more productive than conventional languages, such as C and Java, for programming problems involving string manipulation and search in a dictionary, and determined that memory consumption was often "better than Java and not much worse than C or C++".<ref name="AutoNT-28" />
 
The combination of Python and [[Prolog]] has proven useful for AI applications, with Prolog providing knowledge representation and reasoning capabilities. The Janus system, in particular, exploits similarities between these two languages, in part because of their dynamic typing and their simple, recursive data structures. This combination is typically applied natural language processing, visual query answering, geospatial reasoning, and handling semantic web data.<ref>Andersen, C. and Swift, T., 2023. The Janus System: a bridge to new prolog applications. In Prolog: The Next 50 Years (pp. 93–104). Cham: Springer Nature Switzerland.</ref><ref>{{Cite web |title=SWI-Prolog Python interface |url=https://www.swi-prolog.org/pldoc/doc_for?object=section(%27packages/janus.html%27) |access-date=2024-03-15 |language=en-US |archive-date=15 March 2024 |archive-url=https://web.archive.org/web/20240315162046/https://www.swi-prolog.org/pldoc/doc_for?object=section%28%27packages%2Fjanus.html%27%29 |url-status=live}}</ref>
Large organizations that use Python include [[Wikipedia]], [[Google]],<ref name="quotes-about-python" /> [[Yahoo!]],<ref name="AutoNT-29" /> [[CERN]],<ref name="AutoNT-30" /> [[NASA]],<ref name="AutoNT-31" /> [[Facebook]],<ref>{{Cite web|url=https://developers.facebook.com/blog/post/301|title=Tornado: Facebook's Real-Time Web Framework for Python - Facebook for Developers|website=Facebook for Developers|language=en-US|access-date=19 June 2018|archive-date=19 February 2019|archive-url=https://web.archive.org/web/20190219031313/https://developers.facebook.com/blog/post/301|url-status=live}}</ref> [[Amazon (company)|Amazon]], [[Instagram]],<ref>{{cite web |url=https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad |title=What Powers Instagram: Hundreds of Instances, Dozens of Technologies |date=11 December 2016 |publisher=Instagram Engineering |access-date=27 May 2019 |archive-date=15 June 2020 |archive-url=https://web.archive.org/web/20200615183410/https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad |url-status=live }}</ref> [[Spotify]]<ref>{{Cite web|url=https://labs.spotify.com/2013/03/20/how-we-use-python-at-spotify/|title=How we use Python at Spotify|website=Spotify Labs|language=en-US|access-date=25 July 2018|date=20 March 2013|archive-date=10 June 2020|archive-url=https://web.archive.org/web/20200610005143/https://labs.spotify.com/2013/03/20/how-we-use-python-at-spotify/|url-status=live}}</ref> and some smaller entities like [[Industrial Light & Magic|ILM]]<ref name="AutoNT-32" /> and [[ITA Software|ITA]].<ref name="AutoNT-33" /> The social news networking site [[Reddit]] was written mostly in Python.<ref>{{Citation|title=GitHub - reddit-archive/reddit: historical code from reddit.com.|url=https://github.com/reddit-archive/reddit|publisher=The Reddit Archives|access-date=20 March 2019|archive-date=1 June 2020|archive-url=https://web.archive.org/web/20200601104939/https://github.com/reddit-archive/reddit|url-status=live}}</ref>
The Natlog system, implemented in Python, uses [[Definite clause grammar|Definite Clause Grammars]] (DCGs) to create prompts for two types of generators: text-to-text generators such as GPT3, and text-to-image generators such as DALL-E or Stable Diffusion.<ref>Tarau, P., 2023. Reflections on automation, learnability and expressiveness in logic-based programming languages. In Prolog: The Next 50 Years (pp. 359–371). Cham: Springer Nature Switzerland.</ref>
 
Python can be used for graphical user interfaces (GUIs), by using libraries such as [[Tkinter]].<ref>{{cite web |url=https://docs.python.org/3/library/tkinter.html |title=Tkinter — Python interface to TCL/Tk |access-date=9 June 2023 |archive-date=18 October 2012 |archive-url=https://web.archive.org/web/20121018043136/http://docs.python.org/library/tkinter.html |url-status=live}}</ref> Similarly, for the [[One Laptop per Child]] XO computer, most of the [[Sugar (software)|Sugar]] desktop environment is written in Python (as of 2008).<ref>{{cite web |url=https://www.geeksforgeeks.org/python-tkinter-tutorial/ |title=Python Tkinter Tutorial |date=3 June 2020 |access-date=9 June 2023 |archive-date=9 June 2023 |archive-url=https://web.archive.org/web/20230609031631/https://www.geeksforgeeks.org/python-tkinter-tutorial/ |url-status=live}}</ref>
==Uses==
{{Main|List of Python software}}
[[File:Python Powered.png|thumb|Python Powered]]
Python can serve as a [[scripting language]] for [[web application]]s, e.g., via {{Not a typo|[[mod_wsgi]]}} for the [[Apache web server]].<ref name="AutoNT-35" /> With [[Web Server Gateway Interface]], a standard API has evolved to facilitate these applications. [[Web framework]]s like [[Django (web framework)|Django]], [[Pylons (web framework)|Pylons]], [[Pyramid (web framework)|Pyramid]], [[TurboGears]], [[web2py]], [[Tornado (web server)|Tornado]], [[Flask (web framework)|Flask]], [[Bottle (web framework)|Bottle]] and [[Zope]] support developers in the design and maintenance of complex applications. Pyjs and [[IronPython]] can be used to develop the client-side of Ajax-based applications. [[SQLAlchemy]] can be used as a [[Data mapper pattern|data mapper]] to a relational database. [[Twisted (software)|Twisted]] is a framework to program communications between computers, and is used (for example) by [[Dropbox (service)|Dropbox]].
 
Python is embedded in many software products (and some hardware products) as a scripting language. These products include the following:
Libraries such as [[NumPy]], [[SciPy]] and [[Matplotlib]] allow the effective use of Python in scientific computing,<ref name="cise">{{cite journal |last=Oliphant |first=Travis |title=Python for Scientific Computing |journal=Computing in Science and Engineering |volume=9 |issue=3 |pages=10–20 |year=2007 |url=https://www.h2desk.com/blog/python-scientific-computing/ |doi=10.1109/MCSE.2007.58 |citeseerx=10.1.1.474.6460 |bibcode=2007CSE.....9c..10O |s2cid=206457124 |access-date=10 April 2015 |archive-date=15 June 2020 |archive-url=https://web.archive.org/web/20200615193226/https://www.h2desk.com/blog/python-scientific-computing/ |url-status=live }}</ref><ref name="millman">{{cite journal |first1=K. Jarrod |last1=Millman |first2=Michael |last2=Aivazis |title=Python for Scientists and Engineers |journal=Computing in Science and Engineering |volume=13 |number=2 |pages=9–12 |year=2011 |url=http://www.computer.org/csdl/mags/cs/2011/02/mcs2011020009.html |doi=10.1109/MCSE.2011.36 |bibcode=2011CSE....13b...9M |access-date=7 July 2014 |archive-date=19 February 2019 |archive-url=https://web.archive.org/web/20190219031439/https://www.computer.org/csdl/mags/cs/2011/02/mcs2011020009.html |url-status=live }}</ref> with specialized libraries such as [[Biopython]] and [[Astropy]] providing ___domain-specific functionality. [[SageMath]] is a [[computer algebra system]] with a [[notebook interface]] programmable in Python: its library covers many aspects of [[mathematics]], including [[algebra]], [[combinatorics]], [[numerical mathematics]], [[number theory]], and [[calculus]].<ref name="ICSE" >{{Citation|title=Science education with SageMath|url=http://visual.icse.us.edu.pl/methodology/why_Sage.html|publisher=Innovative Computing in Science Education|access-date=22 April 2019|archive-date=15 June 2020|archive-url=https://web.archive.org/web/20200615180428/http://visual.icse.us.edu.pl/methodology/why_Sage.html|url-status=dead}}</ref> [[OpenCV]] has Python bindings with a rich set of features for [[computer vision]] and [[Digital image processing|image processing]].<ref>{{Cite web|title=OpenCV: OpenCV-Python Tutorials|url=https://docs.opencv.org/3.4.9/d6/d00/tutorial_py_root.html|access-date=2020-09-14|website=docs.opencv.org|archive-date=23 September 2020|archive-url=https://web.archive.org/web/20200923063145/https://docs.opencv.org/3.4.9/d6/d00/tutorial_py_root.html|url-status=live}}</ref>
 
* [[finite element method]] software such as [[Abaqus]],
Python is commonly used in [[artificial intelligence]] projects and machine learning projects with the help of libraries like [[TensorFlow]], [[Keras]], [[PyTorch|Pytorch]] and [[Scikit-learn]].<ref name=whitepaper2015>{{cite web |last1 = Dean |first1 = Jeff |last2 = Monga |first2 = Rajat |first3 = Sanjay |last3 = Ghemawat |display-authors = 2 |author-link1 = Jeff Dean (computer scientist) |title = TensorFlow: Large-scale machine learning on heterogeneous systems |url = http://download.tensorflow.org/paper/whitepaper2015.pdf |website = TensorFlow.org |publisher = Google Research |access-date = 10 November 2015 |date = 9 November 2015 |archive-date = 20 November 2015 |archive-url = https://web.archive.org/web/20151120004649/http://download.tensorflow.org/paper/whitepaper2015.pdf |url-status = live }}</ref><ref>{{cite web |last1=Piatetsky |first1=Gregory |title=Python eats away at R: Top Software for Analytics, Data Science, Machine Learning in 2018: Trends and Analysis |url=https://www.kdnuggets.com/2018/05/poll-tools-analytics-data-science-machine-learning-results.html/2 |website=KDnuggets |publisher=KDnuggets |access-date=30 May 2018 |archive-date=15 November 2019 |archive-url=https://web.archive.org/web/20191115234216/https://www.kdnuggets.com/2018/05/poll-tools-analytics-data-science-machine-learning-results.html/2 |url-status=live }}</ref><ref>{{cite web|url=https://scikit-learn.org/stable/testimonials/testimonials.html|title=Who is using scikit-learn? — scikit-learn 0.20.1 documentation|website=scikit-learn.org|access-date=30 November 2018|archive-date=6 May 2020|archive-url=https://web.archive.org/web/20200506210716/https://scikit-learn.org/stable/testimonials/testimonials.html|url-status=live}}</ref><ref>{{cite web |author-link1 = Norman Jouppi |last1 = Jouppi |first1 = Norm |title = Google supercharges machine learning tasks with TPU custom chip |url = https://cloudplatform.googleblog.com/2016/05/Google-supercharges-machine-learning-tasks-with-custom-chip.html |website = Google Cloud Platform Blog |access-date = 19 May 2016 |archive-date = 18 May 2016 |archive-url = https://web.archive.org/web/20160518201516/https://cloudplatform.googleblog.com/2016/05/Google-supercharges-machine-learning-tasks-with-custom-chip.html |url-status = live }}</ref> As a scripting language with [[modular programming|modular architecture]], simple syntax and rich text processing tools, Python is often used for [[natural language processing]].<ref name="AutoNT-47" />
* 3D parametric modelers such as [[FreeCAD]],
* 3D animation packages such as [[3ds Max]], [[Blender (software)|Blender]], [[Cinema 4D]], [[LightWave 3D|Lightwave]], [[Houdini (software)|Houdini]], [[Maya (software)|Maya]], [[modo (software)|modo]], [[MotionBuilder]], [[Autodesk Softimage|Softimage]],
* the visual effects compositor [[Nuke (software)|Nuke]],
* 2D imaging programs such as [[GIMP]],<ref>{{cite web |url=https://gimp-win.sourceforge.net/faq.html |title=Installers for GIMP for Windows – Frequently Asked Questions |author=<!-- Staff writer(s); no by-line. --> |date=26 July 2013 |access-date=26 July 2013 |url-status=dead |archive-url=https://web.archive.org/web/20130717070814/http://gimp-win.sourceforge.net/faq.html |archive-date=17 July 2013}}</ref> [[Inkscape]], [[Scribus]] and [[Paint Shop Pro]],<ref name="AutoNT-38" /> and
* [[musical notation]] programs such as [[scorewriter]] and [[Capella (notation program)|capella]].
 
Python has been successfully embedded in many software products as a scripting languageSimilarly, including in [[finite element method]] software such as [[Abaqus]], 3D parametric modeler like [[FreeCAD]], 3D animation packages such as [[3ds Max]], [[Blender (software)|Blender]], [[Cinema 4D]], [[Lightwave]], [[Houdini (software)|Houdini]], [[Maya (software)|Maya]], [[modo (software)|modo]], [[MotionBuilder]], [[Autodesk Softimage|Softimage]], the visual effects compositor [[Nuke (software)|Nuke]], 2D imaging programs like [[GIMP]],<ref>{{cite web |url=http://gimp-win.sourceforge.net/faq.html |title=Installers for GIMP for Windows - Frequently Asked Questions |author=<!-- Staff writer(s); no by-line. --> |date=26 July 2013 |access-date=26 July 2013 |url-status=dead |archive-url=https://web.archive.org/web/20130717070814/http://gimp-win.sourceforge.net/faq.html |archive-date=17 July 2013}}</ref> [[Inkscape]], [[Scribus]] and [[Paint Shop Pro]],<ref name="AutoNT-38" /> and [[musical notation]] programs like [[scorewriter]] and [[Capella (notation program)|capella]]. [[GNU Debugger]] uses Python as a [[Prettyprint|pretty printer]] to show complex structures such as C++ containers. [[Esri]] promotes Python as the best choice for writing scripts in [[ArcGIS]].<ref name="AutoNT-39" /> ItPython has also been used in several video games,<ref name="AutoNT-40" /><ref name="AutoNT-41" /> and it has been adopted as first of the three available [[programming language]]s available in [[Google App Engine]], (the other two being [[Java (software platform)|Java]] and [[Go (programming language)|Go]]).<ref name="AutoNT-42" /> [[LibreOffice]] includes Python, and its developers plan to replace Java with Python; LibreOffice's Python Scripting Provider is a core feature<ref>{{cite web |year=2013 |title=4.0 New Features and Fixes |url=http://www.libreoffice.org/download/4-0-new-features-and-fixes/ |url-status=live |archive-url=https://web.archive.org/web/20140209184807/http://www.libreoffice.org/download/4-0-new-features-and-fixes/ |archive-date=9 February 2014 |access-date=25 February 2013 |work=LibreOffice.org |publisher=[[The Document Foundation]]}}</ref> since version 4.0 (from 7 February 2013).
 
Among hardware products, the [[Raspberry Pi]] [[single-board computer]] project has adopted Python as its main user-programming language.
Many operating systems include Python as a standard component. It ships with most [[Linux distribution]]s,<ref>{{Cite web|url=https://docs.python.org/3/using/unix.html|title=Python Setup and Usage|publisher=Python Software Foundation|access-date=10 January 2020|archive-date=17 June 2020|archive-url=https://web.archive.org/web/20200617143505/https://docs.python.org/3/using/unix.html|url-status=live}}</ref> [[AmigaOS 4]] (using Python&nbsp;2.7), [[FreeBSD]] (as a package), [[NetBSD]], [[OpenBSD]] (as a package) and [[macOS]] and can be used from the command line (terminal). Many Linux distributions use installers written in Python: [[Ubuntu (operating system)|Ubuntu]] uses the [[Ubiquity (software)|Ubiquity]] installer, while [[Red Hat Linux]] and [[Fedora (operating system)|Fedora]] use the [[Anaconda (installer)|Anaconda]] installer. [[Gentoo Linux]] uses Python in its [[package management system]], [[Portage (software)|Portage]].
 
Many operating systems include Python as a standard component. Python ships with most [[Linux distribution]]s,<ref>{{Cite web|url=https://docs.python.org/3/using/unix.html|title=Python Setup and Usage|publisher=Python Software Foundation|access-date=10 January 2020|archive-date=17 June 2020|archive-url=https://web.archive.org/web/20200617143505/https://docs.python.org/3/using/unix.html|url-status=live}}</ref> [[AmigaOS 4]] (using Python&nbsp;2.7), [[FreeBSD]] (as a package), [[NetBSD]], and [[OpenBSD]] (as a package); it can be used from the command line (terminal). Many Linux distributions use installers written in Python: [[Ubuntu]] uses the [[Ubiquity (software)|Ubiquity]] installer, while [[Red Hat Linux]] and [[Fedora Linux]] use the [[Anaconda (installer)|Anaconda]] installer. [[Gentoo Linux]] uses Python in its [[package management system]], [[Portage (software)|Portage]].<ref name="AutoNT-51" />
Python is used extensively in the [[information security]] industry, including in exploit development.<ref name="AutoNT-49" /><ref name="AutoNT-50" />
 
Python is used extensively in the information security industry, including in exploit development.<ref name="AutoNT-49" /><ref name="AutoNT-50" />
Most of the [[Sugar (software)|Sugar]] software for the [[One Laptop per Child]] XO, now developed at [[Sugar Labs]], is written in Python.<ref name="AutoNT-51" /> The [[Raspberry Pi]] [[single-board computer]] project has adopted Python as its main user-programming language.
 
==Limitations==
[[LibreOffice]] includes Python, and intends to replace Java with Python. Its Python Scripting Provider is a core feature<ref>{{cite web |title=4.0 New Features and Fixes |publisher=[[The Document Foundation]] |work=LibreOffice.org |year=2013 |url=http://www.libreoffice.org/download/4-0-new-features-and-fixes/ |access-date=25 February 2013 |archive-date=9 February 2014 |archive-url=https://web.archive.org/web/20140209184807/http://www.libreoffice.org/download/4-0-new-features-and-fixes/ |url-status=live }}</ref> since Version 4.0 from 7 February 2013.
* The energy usage of Python is much worse than C by a factor of 75.88.<ref name=":1">{{Cite journal |last=Pereira |first=Rui |last2=Couto |first2=Marco |last3=Ribeiro |first3=Francisco |last4=Rua |first4=Rui |last5=Cunha |first5=Jácome |last6=Fernandes |first6=João Paulo |last7=Saraiva |first7=João |date=2017-10-23 |title=Energy efficiency across programming languages: how do energy, time, and memory relate? |url=https://doi.org/10.1145/3136014.3136031 |journal=Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering |series=SLE 2017 |___location=New York, NY, USA |publisher=Association for Computing Machinery |pages=256–267 |doi=10.1145/3136014.3136031 |isbn=978-1-4503-5525-4}}</ref>
* Python lacks do while loops<ref>{{cite web|url=https://mail.python.org/pipermail/python-ideas/2013-June/021610.html|title=[Python-ideas] PEP 315: do-while}}</ref>
* The throughput of Python is worse than C by a factor of 71.9.<ref name=":1" />
* The average memory usage of Python is worse than C by a factor of 2.4.<ref name=":1" />
* Creating an executable with Python requires bundling the entire Python interpreter into the executable, which causes binary sizes of small executable to be massive.<ref>{{cite web|url=https://pyinstaller.org/en/stable/operating-mode.html|title=What PyInstaller Does and How It Does It}}</ref>
* Significant whitespace causes Python scripts to be difficult to minify. The most compact minification can transform each indent level into a tab.<ref>{{cite web|url=https://github.com/dflook/python-minifier/issues/130|title=Feature Request: Whitespace Minification and Line Merging Options #130}}</ref> However, this always takes up at least as much or more than braces.
 
==Languages influenced by Python==
Python's design and philosophy have influenced many other programming languages:
* [[Boo (programming language)|Boo]] uses indentation, a similar syntax, and a similar object model.<ref name="AutoNT-90" />
* [[Cobra (programming language)|Cobra]] uses indentation and a similar syntax, and; its ''Acknowledgements'' document lists Python first among influencing languages that influenced it.<ref name="AutoNT-91" />
* [[CoffeeScript]], a programming language that cross-compiles to JavaScript, has a Python-inspired syntax.
* [[ECMAScript]]/[[JavaScript]] borrowed iterators and [[generator (computer science)|generators]] from Python.<ref name="AutoNT-93" />
* [[GDScript]], a Python-like scripting language verythat similar to Python,is built- in to the [[Godot (game engine)|Godot]] game engine.<ref>{{Cite web|url=https://docs.godotengine.org/en/stable/about/faq.html|title=Frequently asked questions|website=Godot Engine documentation|access-date=10 May 2021|archive-date=28 April 2021|archive-url=https://web.archive.org/web/20210428053339/https://docs.godotengine.org/en/stable/about/faq.html|url-status=live}}</ref>
* [[Go (programming language)|Go]] is designed for the "speed of working in a dynamic language like Python";<ref name="AutoNT-94"/> andGo shares the samePython's syntax for slicing arrays.
* [[Groovy (programming language)|Groovy]] was motivated by thea desire to bringincorporate the Python design philosophy tointo [[Java (programming language)|Java]].<ref name="AutoNT-95" />
* [[Julia (programming language)|Julia]] was designed to be "as usable for general programming as Python".<ref name=Julia>{{cite web| |title= Why We Created Julia| |date= February 2012| |website= Julia website| |url= https://julialang.org/blog/2012/02/why-we-created-julia| |access-date= 5 June 2014| |quote= We want something as usable for general programming as Python [...]| |archive-date= 2 May 2020| |archive-url= https://web.archive.org/web/20200502144010/https://julialang.org/blog/2012/02/why-we-created-julia/| |url-status= live}}</ref>
* [[Mojo (programming language)|Mojo]] is a non-strict<ref name="Mojo"/><ref>{{Cite web |title=Modular Docs – Why Mojo |url=https://docs.modular.com/mojo/why-mojo.html |access-date=2023-05-05 |website=docs.modular.com |language=en |quote=Mojo as a member of the Python family [..] Embracing Python massively simplifies our design efforts, because most of the syntax is already specified. [..] we decided that the right long-term goal for Mojo is to provide a superset of Python (i.e. be compatible with existing programs) and to embrace the CPython immediately for long-tail ecosystem enablement. To a Python programmer, we expect and hope that Mojo will be immediately familiar, while also providing new tools for developing systems-level code that enable you to do things that Python falls back to C and C++ for. |archive-date=5 May 2023 |archive-url=https://web.archive.org/web/20230505083518/https://docs.modular.com/mojo/why-mojo.html |url-status=live}}</ref> superset of Python (e.g., omitting classes, and adding [[struct]]).<ref>{{Cite web |last=Spencer |first=Michael |title=What is Mojo Programming Language? |url=https://datasciencelearningcenter.substack.com/p/what-is-mojo-programming-language |access-date=2023-05-05 |website=datasciencelearningcenter.substack.com |date=4 May 2023 |language=en |archive-date=5 May 2023 |archive-url=https://web.archive.org/web/20230505090408/https://datasciencelearningcenter.substack.com/p/what-is-mojo-programming-language |url-status=live}}</ref>
* [[Nim (programming language)|Nim]] uses indentation and similar syntax.<ref>{{cite web |url=https://www.infoworld.com/article/3157745/application-development/nim-language-draws-from-best-of-python-rust-go-and-lisp.html |title=Nim language draws from best of Python, Rust, Go, and Lisp |first=Serdar |last=Yegulalp |date=16 January 2017 |website=InfoWorld |quote=Nim's syntax is strongly reminiscent of Python's, as it uses indented code blocks and some of the same syntax (such as the way if/elif/then/else blocks are constructed). |access-date=7 June 2020 |archive-date=13 October 2018 |archive-url=https://web.archive.org/web/20181013211847/https://www.infoworld.com/article/3157745/application-development/nim-language-draws-from-best-of-python-rust-go-and-lisp.html |url-status=live }}</ref>
* [[Nim (programming language)|Nim]] uses indentation and a similar syntax.<ref>{{cite web |url=https://www.infoworld.com/article/3157745/application-development/nim-language-draws-from-best-of-python-rust-go-and-lisp.html |title=Nim language draws from best of Python, Rust, Go, and Lisp |first=Serdar |last=Yegulalp |date=16 January 2017 |website=InfoWorld |quote=Nim's syntax is strongly reminiscent of Python's, as it uses indented code blocks and some of the same syntax (such as the way if/elif/then/else blocks are constructed). |access-date=7 June 2020 |archive-date=13 October 2018 |archive-url=https://web.archive.org/web/20181013211847/https://www.infoworld.com/article/3157745/application-development/nim-language-draws-from-best-of-python-rust-go-and-lisp.html |url-status=live}}</ref>
* [[Ruby (programming language)|Ruby]]'s creator, [[Yukihiro Matsumoto]], has said: "I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python. That's why I decided to design my own language."<ref name="linuxdevcenter" />
* [[Ruby (programming language)|Ruby]]'s creator, [[Yukihiro Matsumoto]], said that "I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python. That's why I decided to design my own language."<ref name="linuxdevcenter"/>
* [[Swift (programming language)|Swift]], a programming language developed by Apple, has some Python-inspired syntax.<ref>{{cite web |url=http://nondot.org/sabre |title=Chris Lattner's Homepage |publisher=Chris Lattner |first=Chris |last=Lattner |author-link=Chris Lattner |date=3 June 2014 |access-date=3 June 2014 |quote=I started work on the Swift Programming Language in July of 2010. I implemented much of the basic language structure, with only a few people knowing of its existence. A few other (amazing) people started contributing in earnest late in 2011, and it became a major focus for the Apple Developer Tools group in July 2013 [...] drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. |archive-date=22 December 2015 |archive-url=https://web.archive.org/web/20151222150510/http://nondot.org/sabre/ |url-status=live }}</ref>
* [[Swift (programming language)|Swift]], a programming language developed by Apple, has some Python-inspired syntax.<ref>{{cite web |url=http://nondot.org/sabre |title=Chris Lattner's Homepage |publisher=Chris Lattner |first=Chris |last=Lattner |author-link=Chris Lattner |date=3 June 2014 |access-date=3 June 2014 |quote=I started work on the Swift Programming Language in July of 2010. I implemented much of the basic language structure, with only a few people knowing of its existence. A few other (amazing) people started contributing in earnest late in 2011, and it became a major focus for the Apple Developer Tools group in July 2013 [...] drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. |archive-date=22 December 2015 |archive-url=https://web.archive.org/web/20151222150510/http://nondot.org/sabre/ |url-status=live}}</ref>
* [[Kotlin (programming language)|Kotlin]] blends Python and Java features, which minimizes boilerplate code and enhances developer efficiency.<ref>{{Cite web |last=Jalan |first=Nishant Aanjaney |date=2022-11-10 |title=Programming in Kotlin |url=https://medium.com/codex/programming-in-kotlin-934bdb3659cf |access-date=2024-04-29 |website=CodeX |language=en}}</ref>
 
Python's development practices have also been emulated by other languages. For example, the practice ofPython requiringrequires a document describingthat describes the rationale for, and issuescontext surrounding,for aany language change; tothis thedocument languageis (inknown Python,as a ''Python Enhancement Proposal'' or PEP). This practice is also used inby the developers of [[Tcl]],<ref name="AutoNT-99" /> [[Erlang (programming language)|Erlang]],<ref name="AutoNT-100" /> and Swift.<ref>{{cite web | title=Swift Evolution Process | date=18 February 2020 | website=Swift Programming Language Evolution repository on GitHub | url=https://github.com/apple/swift-evolution/blob/master/process.md | access-date=27 April 2020 | archive-date=27 April 2020 | archive-url=https://web.archive.org/web/20200427182556/https://github.com/apple/swift-evolution/blob/master/process.md | url-status=live }}</ref>
 
==See also==
{{Portal|Computer programming|Free and open-source software}}
* [[Google Colab]]{{snd}} zero setup [[Online integrated development environment|online IDE]] that runs Python
* [[Python syntax and semantics]]
* [[pip (package manager)]]
 
* [[Differentiable programming]]
{{Clear}}
 
==Notes==
{{Notelist}}
 
==References==
{{Reflistreflist|30em25em|refs=
 
<ref name="faq-created">{{cite web |url=https://docs.python.org/faq/general.html#why-was-python-created-in-the-first-place |title=Why was Python created in the first place? |work=General Python FAQ |publisher=Python Software Foundation |access-date=22 March 2007 |archive-date=24 October 2012 |archive-url=https://web.archive.org/web/20121024164224/http://docs.python.org/faq/general.html#why-was-python-created-in-the-first-place |url-status=live |quote=I had extensive experience with implementing an interpreted language in the ABC group at CWI, and from working with this group I had learned a lot about language design. This is the origin of many Python features, including the use of indentation for statement grouping and the inclusion of very high-level data types (although the details are all different in Python).}}</ref>
 
<ref name="98-interview">{{cite web |url=http://www.amk.ca/python/writing/gvr-interview |title=Interview with Guido van Rossum (July 1998) |last=Kuchling |first=Andrew M. |work=amk.ca |date=22 December 2006 |access-date=12 March 2012 |url-status=dead |archive-url=https://web.archive.org/web/20070501105422/http://www.amk.ca/python/writing/gvr-interview |archive-date=1 May 2007 |quote=I'd spent a summer at DEC's Systems Research Center, which introduced me to Modula-2+; the Modula-3 final report was being written there at about the same time. What I learned there later showed up in Python's exception handling, modules, and the fact that methods explicitly contain 'self' in their parameter list. String slicing came from Algol-68 and Icon.}}</ref>
 
<ref name="AutoNT-1">{{ cite journal |last=van Rossum |first=Guido |year=1993 |title=An Introduction to Python for UNIX/C Programmers |journal=Proceedings of the NLUUG Najaarsconferentie (Dutch UNIX Users Group) |quote=even though the design of C is far from ideal, its influence on Python is considerable. |citeseerx=10.1.1.38.2023 }}</ref>
 
<ref name="classmix">{{cite web |url=https://docs.python.org/tutorial/classes.html |title=Classes |work=The Python Tutorial |publisher=Python Software Foundation |access-date=20 February 2012 |quote=It is a mixture of the class mechanisms found in C++ and Modula-3 |archive-date=23 October 2012 |archive-url=https://web.archive.org/web/20121023030209/http://docs.python.org/tutorial/classes.html |url-status=live }}</ref>
 
<ref name="effbot-call-by-object">{{cite web |url=http://effbot.org/zone/call-by-object.htm |title=Call By Object |work=effbot.org |last=Lundh |first=Fredrik |quote=replace "CLU" with "Python", "record" with "instance", and "procedure" with "function or method", and you get a pretty accurate description of Python's object model. |access-date=21 November 2017 |archive-date=23 November 2019 |archive-url=https://web.archive.org/web/20191123043655/http://effbot.org/zone/call-by-object.htm |url-status=live }}</ref>
 
<ref name="AutoNT-2">{{cite web |url=https://www.python.org/download/releases/2.3/mro/ |title=The Python 2.3 Method Resolution Order |last=Simionato |first=Michele |publisher=Python Software Foundation |quote=The C3 method itself has nothing to do with Python, since it was invented by people working on Dylan and it is described in a paper intended for lispers |access-date=29 July 2014 |archive-date=20 August 2020 |archive-url=https://web.archive.org/web/20200820231854/https://www.python.org/download/releases/2.3/mro/ |url-status=live }}</ref>
 
<ref name="AutoNT-3">{{cite web |url=https://docs.python.org/howto/functional.html |title=Functional Programming HOWTO |last=Kuchling |first=A. M. |work=Python v2.7.2 documentation |publisher=Python Software Foundation |quote=List comprehensions and generator expressions [...] are a concise notation for such operations, borrowed from the functional programming language Haskell. |access-date=9 February 2012 |archive-date=24 October 2012 |archive-url=https://web.archive.org/web/20121024163217/http://docs.python.org/howto/functional.html |url-status=live }}</ref>
 
<ref name="pep0238">{{cite web |url=https://www.python.org/dev/peps/pep-0238/ |title=PEP 238&nbsp;– Changing the Division Operator |first1=Moshe |last1=Zadka |first2=Guido |last2=van Rossum |date=11 March 2001 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=23 October 2013 |archive-date=28 May 2020 |archive-url=https://web.archive.org/web/20200528115550/https://www.python.org/dev/peps/pep-0238/ |url-status=live }}</ref>
 
<ref name="AutoNT-4">{{cite web |url=https://www.python.org/dev/peps/pep-0255/ |title=PEP 255&nbsp;– Simple Generators |first1=Neil |last1=Schemenauer |first2=Tim |last2=Peters |first3=Magnus Lie |last3=Hetland |date=18 May 2001 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=9 February 2012 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605012926/https://www.python.org/dev/peps/pep-0255/ |url-status=live }}</ref>
 
<ref name="AutoNT-56">{{cite web |url=https://wwwdocs.python.org/dev3.2/peps/pep-0318tutorial/controlflow.html |title=PEPMore 318&nbsp;–Control DecoratorsFlow forTools Functions|work=Python and3 Methodsdocumentation |first1publisher=KevinPython D.Software |last1=SmithFoundation |first2access-date=Jim24 J.July |last2=Jewett2015 |first3archive-date=Skip4 |last3=MontanaroJune |first4=Anthony2016 |last4quote=BaxterBy |date=2popular Septemberdemand, 2004a |work=Pythonfew features commonly found in Enhancementfunctional Proposalsprogramming languages like Lisp have been added to |publisher=Python. SoftwareWith Foundationthe |access-date=24lambda Februarykeyword, 2012small |archive-date=3anonymous Junefunctions 2020can be created. |archive-url=https://web.archive.org/web/2020060313373420160604080843/https://wwwdocs.python.org/dev3.2/peps/pep-0318tutorial/controlflow.html |url-status=live }}</ref>
 
<ref name="bini">{{cite book |last=Bini |first=Ola |title=Practical JRuby on Rails Web 2.0 Projects: bringing Ruby on Rails to the Java platform |year=2007 |publisher=APress |___location=Berkeley |isbn=978-1-59059-881-8 |page=[https://archive.org/details/practicaljrubyon0000bini/page/3 3] |url-access=registration |url=https://archive.org/details/practicaljrubyon0000bini/page/3}}</ref>
<ref name="AutoNT-6">{{cite web |url=https://docs.python.org/3.2/tutorial/controlflow.html |title=More Control Flow Tools |work=Python 3 documentation |publisher=Python Software Foundation |access-date=24 July 2015 |archive-date=4 June 2016 |archive-url=https://web.archive.org/web/20160604080843/https://docs.python.org/3.2/tutorial/controlflow.html |url-status=live }}</ref>
 
<ref name="bini">{{cite book |last=Bini |first=Ola |title=Practical JRuby on Rails Web 2.0 Projects: bringing Ruby on Rails to the Java platform |year=2007 |publisher=APress |___location=Berkeley |isbn=978-1-59059-881-8 |page=[https://archive.org/details/practicaljrubyon0000bini/page/3 3] |url-access=registration |url=https://archive.org/details/practicaljrubyon0000bini/page/3 }}</ref>
 
<ref name="AutoNT-7">{{cite web |last=Kuhlman |first=Dave |url=https://www.davekuhlman.org/python_book_01.pdf|title=A Python Book: Beginning Python, Advanced Python, and Python Exercises |at=Section 1.1|url-status=dead |archive-url=https://web.archive.org/web/20120623165941/http://cutter.rexx.com/~dkuhlman/python_book_01.html |archive-date=23 June 2012}}</ref>
 
<ref name="Aboutvenners-interview-pt-1">{{cite web |url=httpshttp://www.pythonartima.orgcom/aboutintv/pythonP.html |title=AboutThe Making of Python |publisherlast=PythonVenners Software|first=Bill Foundation|date=13 January 2003 |work=Artima Developer |publisher=Artima |access-date=2422 AprilMarch 20122007 |archive-date=201 AprilSeptember 20122016 |archive-url=https://web.archive.org/web/2012042001004920160901183332/http://www.pythonartima.orgcom/aboutintv/pythonP.html |url-status=live }}, second section "Fans of Python use the phrase "batteries included" to describe the standard library, which covers everything from asynchronous processing to zip files."</ref>
 
<ref name="venners-interview-pt-1">{{cite web |url=http://www.artima.com/intv/pythonP.html |title=The Making of Python |last=Venners |first=Bill |date=13 January 2003 |work=Artima Developer |publisher=Artima |access-date=22 March 2007 |archive-date=1 September 2016 |archive-url=https://web.archive.org/web/20160901183332/http://www.artima.com/intv/pythonP.html |url-status=live }}</ref>
 
<ref name="timeline-of-python">{{cite web |url=https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html |title=A Brief Timeline of Python |last=van Rossum |first=Guido |date=20 January 2009 |work=The History of Python |access-date=20 January 2009 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605032200/https://python-history.blogspot.com/2009/01/brief-timeline-of-python.html |url-status=live }}</ref>
 
<ref name="AutoNT-12">{{cite mailing list |url=https://mail.python.org/pipermail/python-dev/2000-August/008881.html |title=SETL (was: Lukewarm about range literals) |date=29 August 2000 |access-date=13 March 2011 |mailing-list=Python-Dev |last=van Rossum |first=Guido |author-link=Guido van Rossum |archive-date=14 July 2018 |archive-url=https://web.archive.org/web/20180714064019/https://mail.python.org/pipermail/python-dev/2000-August/008881.html |url-status=live }}</ref>
 
<ref name="newintimeline-2.0of-python">{{cite web |url=https://docs.python-history.orgblogspot.com/whatsnew2009/2.001/brief-timeline-of-python.html |title=What'sA NewBrief inTimeline of Python 2.0 |last1last=Kuchlingvan |first1=A. M. |last2=ZadkaRossum |first2first=MosheGuido |date=1620 OctoberJanuary 20002009 |publisherwork=PythonThe SoftwareHistory Foundationof Python |access-date=1120 FebruaryJanuary 20122009 |archive-date=235 OctoberJune 20122020 |archive-url=https://web.archive.org/web/2012102311204520200605032200/httphttps://docs.python-history.orgblogspot.com/whatsnew2009/2.001/brief-timeline-of-python.html |url-status=live }}</ref>
 
<ref name="3.0AutoNT-release12">{{cite webmailing list |url=https://wwwmail.python.org/downloadpipermail/releasespython-dev/3.02000-August/008881.html |title=PythonSETL 3.0(was: ReleaseLukewarm about range literals) |publisherdate=Python29 SoftwareAugust Foundation2000 |access-date=813 JulyMarch 20092011 |mailing-list=Python-Dev |last=van Rossum |first=Guido |author-link=Guido van Rossum |archive-date=14 JuneJuly 20202018 |archive-url=https://web.archive.org/web/2020061415371420180714064019/https://wwwmail.python.org/downloadpipermail/releasespython-dev/3.02000-August/008881.html |url-status=live }}</ref>
 
<ref name="pepnewin-30002.0">{{cite web |url=https://wwwdocs.python.org/dev/peps/pep-3000whatsnew/2.0.html |title=PEPWhat's 3000&nbsp;–New in Python 30002.0 |lastlast1=vanKuchling Rossum|first1=A. M. |firstlast2=GuidoZadka |datefirst2=5 April 2006Moshe |workdate=Python16 EnhancementOctober Proposals2000 |publisher=Python Software Foundation |access-date=2711 JuneFebruary 20092012 |archive-date=23 October 2012 |archive-url=https://web.archive.org/web/2016030323151320121023112045/httpshttp://wwwdocs.python.org/dev/peps/pep-3000whatsnew/ |archive-date=3 March 20162.0.html |url-status=dead live}}</ref>
 
<ref name="AutoNT-13">{{cite web |url=https://www.python.org/community/pycon/dc2004/papers/24/metaclasses-pycon.pdf |archive-url=https://web.archive.org/web/20090530030205/http://www.python.org/community/pycon/dc2004/papers/24/metaclasses-pycon.pdf |archive-date=30 May 2009 |title=Python Metaclasses: Who? Why? When? |last=The Cain Gang Ltd. |access-date=27 June 2009 |url-status=dead}}</ref>
 
<ref name="AutoNT-14">{{cite web |url=https://docs.python.org/3.0/reference/datamodel.html#special-method-names |title=3.3. Special method names |work=The Python Language Reference |publisher=Python Software Foundation |access-date=27 June 2009 |archive-date=15 December 2018 |archive-url=https://web.archive.org/web/20181215123146/https://docs.python.org/3.0/reference/datamodel.html#special-method-names |url-status=live }}</ref>
 
<ref name="AutoNT-15">{{cite web |url=http://www.nongnu.org/pydbc/ |title=PyDBC: method preconditions, method postconditions and class invariants for Python |access-date=24 September 2011 |archive-date=23 November 2019 |archive-url=https://web.archive.org/web/20191123231931/http://www.nongnu.org/pydbc/ |url-status=live }}</ref>
 
<ref name="AutoNT-16">{{cite web |url=http://www.wayforward.net/pycontract/ |title=Contracts for Python |access-date=24 September 2011 |archive-date=15 June 2020 |archive-url=https://web.archive.org/web/20200615173404/http://www.wayforward.net/pycontract/ |url-status=live }}</ref>
 
<ref name="AutoNT-17">{{cite web |url=https://sites.google.com/site/pydatalog/ |title=PyDatalog |access-date=22 July 2012 |archive-date=13 June 2020 |archive-url=https://web.archive.org/web/20200613160231/https://sites.google.com/site/pydatalog/ |url-status=live }}</ref>
 
<ref name="AutoNT-18">{{cite web |url=https://docs.python.org/3/library/itertools.html |title=6.5 itertools&nbsp;– Functions creating iterators for efficient looping |publisher=Docs.python.org |access-date=22 November 2016 |archive-date=14 June 2020 |archive-url=https://web.archive.org/web/20200614153629/https://docs.python.org/3/library/itertools.html |url-status=live }}</ref>
 
<ref name="PEP20">{{cite web |url=https://www.python.org/dev/peps/pep-0020/ |title=PEP 20&nbsp;– The Zen of Python |last=Peters |first=Tim |date=19 August 2004 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=24 November 2008 |archive-date=26 December 2018 |archive-url=https://web.archive.org/web/20181226141127/https://www.python.org/dev/peps/pep-0020/ |url-status=live }}</ref>
 
<ref name="AutoNT-19">{{cite book |url=http://shop.oreilly.com/product/9780596007973.do |title=Python Cookbook, 2nd Edition |publisher=[[O'Reilly Media]] |last1=Martelli |first1=Alex |last2=Ravenscroft |first2=Anna |last3=Ascher |first3=David |year=2005 |page=230 |isbn=978-0-596-00797-3 |access-date=14 November 2015 |archive-date=23 February 2020 |archive-url=https://web.archive.org/web/20200223171254/http://shop.oreilly.com/product/9780596007973.do |url-status=live }}</ref>
 
<ref name="AutoNT-20">{{cite web | title=Python Culture | website=ebeab | date=January 21, 2014 | url=http://ebeab.com/2014/01/21/python-culture/ | archive-url=https://web.archive.org/web/20140130021902/http://ebeab.com/2014/01/21/python-culture/ | archive-date=January 30, 2014 | url-status=dead}}</ref>
 
<ref name="PepCite000">{{cite web |url=https://www.python.org/dev/peps/pep-0001/ |title=PEP 1&nbsp;– PEP Purpose and Guidelines |last1=Warsaw |first1=Barry |last2=Hylton |first2=Jeremy |last3=Goodger |first3=David |date=13 June 2000 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=19 April 2011 |archive-date=6 June 2020 |archive-url=https://web.archive.org/web/20200606042011/https://www.python.org/dev/peps/pep-0001/ |url-status=live }}</ref>
 
<ref name="AutoNT-21">{{cite web |url=https://www.python.org/dev/intro/ |title=Guido, Some Guys, and a Mailing List: How Python is Developed |last=Cannon |first=Brett |work=python.org |publisher=Python Software Foundation |access-date=27 June 2009 |url-status=dead |archive-url=https://web.archive.org/web/20090601134342/http://www.python.org/dev/intro/ |archive-date=1 June 2009 }}</ref>
 
<ref name="release-schedule">{{cite web |url=https://mail.python.org/pipermail/python-dev/2002-April/022739.html |title=&#91;Python-Dev&#93; Release Schedules (was Stability & change) |last=Norwitz |first=Neal |date=8 April 2002 |access-date=27 June 2009 |archive-date=15 December 2018 |archive-url=https://web.archive.org/web/20181215122750/https://mail.python.org/pipermail/python-dev/2002-April/022739.html |url-status=live }}</ref>
 
<ref name="AutoNT-22">{{cite web |url=https://www.python.org/dev/peps/pep-0006/ |title=PEP 6&nbsp;– Bug Fix Releases |last1=Aahz |last2=Baxter |first2=Anthony |date=15 March 2001 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=27 June 2009 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605001318/https://www.python.org/dev/peps/pep-0006/ |url-status=live }}</ref>
 
<ref name="AutoNT-23">{{cite web |url=https://www.python.org/dev/buildbot/ |title=Python Buildbot |work=Python Developer’sDeveloper's Guide |publisher=Python Software Foundation |access-date=24 September 2011 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605001322/https://www.python.org/dev/buildbot/ |url-status=live }}</ref>
 
<ref name="AutoNT-24whyname">{{cite web |url=https://docs.python.org/3/faq/general.html#why-is-it-called-python |title=GeneralWhy Pythonis FAQit called Python?|work=General Python v2.7.3 documentationFAQ |publisher=Docs.python.org |access-date=4 June3 2020January 2023|archive-date=24 October 2012 |archive-url=https://web.archive.org/web/20121024164224/http://docs.python.org/faq/general.html#why-is-it-called-python |url-status=live }}</ref>
 
<ref name="tutorial-chapter1">{{cite web |url=https://docs.python.org/tutorial/appetite.html |title=Whetting Your Appetite |work=The Python Tutorial |publisher=Python Software Foundation |access-date=20 February 2012 |archive-date=26 October 2012 |archive-url=https://web.archive.org/web/20121026063559/http://docs.python.org/tutorial/appetite.html |url-status=live }}</ref>
 
<ref name="AutoNT-2526">{{cite web |url=httphttps://pythonstackoverflow.net/crewcom/mwhquestions/hacks5033906/objectthink.htmlin-python-should-i-use-else-after-a-return-in-an-if-block |title=HowIn toPython, thinkshould likeI use else after a Pythonistareturn in an if block? |date=17 February 2011 |work=[[Stack Overflow]] |publisher=Stack Exchange |access-date=246 MarchMay 20092011 |archive-date=2320 MarchJune 20182019 |archive-url=https://web.archive.org/web/2018032319334720190620000050/httphttps://pythonstackoverflow.netcom/crewquestions/mwh5033906/hacks/objectthink.htmlin-python-should-i-use-else-after-a-return-in-an-if-block |url-status=dead live}}</ref>
 
<ref name="AutoNTquotes-26about-python">{{cite web |url=https://stackoverflowwww.compython.org/questionsabout/5033906quotes/in-python-should-i-use-else-after-a-return-in-an-if-block |title=InQuotes about Python, should I use else after a return in an if block? |datepublisher=17Python February 2011 |work=[[Stack Overflow]] |publisher=StackSoftware ExchangeFoundation |access-date=68 MayJanuary 20112012 |archive-date=203 June 20192020 |archive-url=https://web.archive.org/web/2019062000005020200603135201/https://stackoverflowwww.compython.org/questionsabout/5033906quotes/in-python-should-i-use-else-after-a-return-in-an-if-block |url-status=live }}</ref>
 
<ref name="AutoNT-2729">{{cite web |url=httphttps://wiki.python.netorg/~goodgermoin/projects/pycon/2007/idiomatic/handout.htmlOrganizationsUsingPython |title=Code Like a Pythonista:Organizations IdiomaticUsing Python |lastpublisher=GoodgerPython |first=DavidSoftware Foundation |access-date=2415 MarchJanuary 2009 |archive-date=21 August 2018 |archive-url=https://web.archive.org/web/2014052720414320180821075931/httphttps://wiki.python.netorg/~goodgermoin/projects/pycon/2007/idiomatic/handout.html |archive-date=27 May 2014OrganizationsUsingPython |url-status=dead live}}</ref>
 
<ref name="AutoNT-2830">{{cite webjournal |urltitle=httpPython ://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf |title=Anthe empiricalholy comparisongrail of C,programming C++, Java, Perl, Python, Rexx, and|journal=CERN TclBulletin |firstissue=Lutz31/2006 |lastpublisher=PrecheltCERN <!--Publications "work"|date=31 doesn'tJuly work..2006 |workurl=[http://pagecdsweb.micern.fu-berlin.dech/journal/CERNBulletin/2006/prechelt31/BiblioNews%20Articles/ Bibliography of Lutz Prechelt]--> |date974627?ln=14 March 2000en |access-date=3011 AugustFebruary 20132012 |archive-date=315 January 20202013 |archive-url=https://web.archive.orgtoday/web/2020010305091520130115191843/http://pagecdsweb.mi.fu-berlincern.dech/precheltjournal/BiblioCERNBulletin/jccpprt_computer2000.pdf2006/31/News%20Articles/974627?ln=en |url-status=live }}</ref>
 
<ref name="quotesAutoNT-about-python31">{{cite web |url=https://www.python.org/about/quotessuccess/usa/ |title=QuotesPython aboutStreamlines PythonSpace Shuttle Mission Design |last=Shafer |first=Daniel G. |date=17 January 2003 |publisher=Python Software Foundation |access-date=824 JanuaryNovember 20122008 |archive-date=35 June 2020 |archive-url=https://web.archive.org/web/2020060313520120200605093424/https://www.python.org/about/quotessuccess/usa/ |url-status=live }}</ref>
 
<ref name="AutoNT-2932">{{cite web |url=https://wikiwww.python.org/moinabout/success/ilm/OrganizationsUsingPython |title=OrganizationsIndustrial Light & Magic Runs Usingon Python |last=Fortenberry |first=Tim |date=17 January 2003 |publisher=Python Software Foundation |access-date=1511 JanuaryFebruary 20092012 |archive-date=216 AugustJune 20182020 |archive-url=https://web.archive.org/web/2018082107593120200606042020/https://wikiwww.python.org/moinabout/success/ilm/OrganizationsUsingPython |url-status=live }}</ref>
 
<ref name="AutoNT-3033">{{cite journalweb |titleurl=http://www.eweek.com/c/a/Application-Development/Python-Slithers-into-Systems/ : the holy|title=Python grailSlithers ofinto programmingSystems |journallast=CERN BulletinTaft |issuefirst=31/2006Darryl |publisher=CERN PublicationsK. |date=315 JulyMarch 20062007 |urlwork=http://cdswebeWeek.cern.ch/journal/CERNBulletin/2006/31/News%20Articles/974627?lncom |publisher=enZiff Davis Holdings |access-date=1124 FebruarySeptember 20122011 |archive-date=1513 JanuaryAugust 20132021 |archive-url=https://web.archive.isorg/20130115191843web/http20210813194304/https://cdswebwww.cerneweek.chcom/journaldevelopment/CERNBulletinpython-slithers-into-systems/2006/31/News%20Articles/974627?ln=en |url-status=live }}</ref>
 
<ref name="AutoNT-3135">{{cite web |url=https://www.python.org/about/success/usa/ |title=PythonUsage Streamlinesstatistics Spaceand Shuttlemarket Missionshare Designof |last=ShaferPython |first=Danielfor G.websites |dateyear=17 January 20032012 |publisherurl=Python Software Foundationhttp://w3techs.com/technologies/details/pl-python/all/all |access-date=2418 NovemberDecember 20082012 |archive-date=513 JuneAugust 20202021 |archive-url=https://web.archive.org/web/2020060509342420210813194305/https://wwww3techs.python.orgcom/abouttechnologies/success/usadetails/pl-python |url-status=live }}</ref>
 
<ref name="AutoNT-3238">{{cite web |url=httpshttp://www.pythonjasc.orgcom/aboutsupport/successcustomercare/ilmarticles/psp9components.asp |title=Industrialjasc Light & Magic Runs on Pythonpsp9components |last=Fortenberry |first=Tim |date=17 January 2003 |publisher=Python Software Foundation |accessurl-datestatus=11 February 2012 |archive-date=6 June 2020dead |archive-url=https://web.archive.org/web/2020060604202020080319061519/httpshttp://www.pythonjasc.orgcom/aboutsupport/successcustomercare/ilmarticles/psp9components.asp |urlarchive-statusdate=live19 March 2008}}</ref>
 
<ref name="AutoNT-3339">{{cite web |url=http://wwwwebhelp.eweekesri.com/carcgisdesktop/a/Application-Development/Python-Slithers-into-Systems9.2/index.cfm?TopicName=About_getting_started_with_writing_geoprocessing_scripts |title=PythonAbout Slithersgetting intostarted Systemswith |last=Taftwriting |first=Darrylgeoprocessing K.scripts |date=517 MarchNovember 20072006 |work=eWeekArcGIS Desktop Help 9.com2 |publisher=ZiffEnvironmental DavisSystems HoldingsResearch Institute |access-date=2411 SeptemberFebruary 20112012 |archive-date=135 AugustJune 20212020 |archive-url=https://web.archive.org/web/2021081319430420200605144616/httpshttp://wwwwebhelp.eweekesri.com/developmentarcgisdesktop/python-slithers-into-systems9.2/index.cfm?TopicName=About_getting_started_with_writing_geoprocessing_scripts |url-status=live }}</ref>
 
<ref name="AutoNT-3440">{{cite web |url=http://community.eveonline.com/news/dev-blogs/stackless-python-2.7/ |title=TIOBEStackless ProgrammingPython Community2.7 Index|publisher=[[CCP PythonGames]] |authordate=TIOBE24 SoftwareAugust Index2010 |yearauthor=2015CCP porkbelly |urlwork=http://www.tiobe.com/index.php/paperinfo/tpci/EVE Community Dev Blogs |quote=As you may know, EVE has at its core the programming language known as Stackless Python.html |access-date=1011 SeptemberJanuary 20152014 |archive-date=711 SeptemberJanuary 20152014 |archive-url=https://web.archive.org/web/2015090702241920140111155537/http://wwwcommunity.tiobeeveonline.com/index.phpnews/paperinfodev-blogs/tpci/Pythonstackless-python-2.html7/ |url-status=live }}</ref>
 
<ref name="AutoNT-35">{{cite web |title=Usage statistics and market share of Python for websites |year=2012 |url=http://w3techs.com/technologies/details/pl-python/all/all |access-date=18 December 2012 |archive-date=13 August 2021 |archive-url=https://web.archive.org/web/20210813194305/https://w3techs.com/technologies/details/pl-python |url-status=live }}</ref>
 
<ref name="AutoNT-38">{{cite web |url=http://www.jasc.com/support/customercare/articles/psp9components.asp |title=jasc psp9components |url-status=dead |archive-url=https://web.archive.org/web/20080319061519/http://www.jasc.com/support/customercare/articles/psp9components.asp |archive-date=19 March 2008 }}</ref>
 
<ref name="AutoNT-39">{{cite web |url=http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=About_getting_started_with_writing_geoprocessing_scripts |title=About getting started with writing geoprocessing scripts |date=17 November 2006 |work=ArcGIS Desktop Help 9.2 |publisher=Environmental Systems Research Institute |access-date=11 February 2012 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605144616/http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=About_getting_started_with_writing_geoprocessing_scripts |url-status=live }}</ref>
 
<ref name="AutoNT-40">{{cite web |url=http://community.eveonline.com/news/dev-blogs/stackless-python-2.7/ |title=Stackless Python 2.7 |publisher=[[CCP Games]] |date=24 August 2010 |author=CCP porkbelly |work=EVE Community Dev Blogs |quote=As you may know, EVE has at its core the programming language known as Stackless Python. |access-date=11 January 2014 |archive-date=11 January 2014 |archive-url=https://web.archive.org/web/20140111155537/http://community.eveonline.com/news/dev-blogs/stackless-python-2.7/ |url-status=live }}</ref>
 
<ref name="AutoNT-41">{{cite web |url=http://www.2kgames.com/civ4/blog_03.htm |title=Modding Sid Meier's Civilization IV |last=Caudill |first=Barry |date=20 September 2005 |publisher=[[Firaxis Games]] |archive-url=https://web.archive.org/web/20101202164144/http://www.2kgames.com/civ4/blog_03.htm |archive-date=2 December 2010 |work=Sid Meier's Civilization IV Developer Blog |quote=we created three levels of tools ... The next level offers Python and XML support, letting modders with more experience manipulate the game world and everything in it. |url-status=dead}}</ref>
Line 585 ⟶ 663:
<ref name="AutoNT-42">{{cite web |url=https://code.google.com/apis/documents/docs/1.0/developers_guide_python.html |title=Python Language Guide (v1.0) |work=Google Documents List Data API v1.0 |archive-url=https://web.archive.org/web/20100715145616/http://code.google.com/apis/documents/docs/1.0/developers_guide_python.html |archive-date=15 July 2010 |url-status=dead}}</ref>
 
<ref name="AutoNT-47">{{Cite web|url=http://www.nltk.org/|title=Natural Language Toolkit NLTK 3.5b1 documentation|website=www.nltk.org|access-date=10 April 2020|archive-date=13 June 2020|archive-url=https://web.archive.org/web/20200613003911/http://www.nltk.org/|url-status=live}}</ref>
 
<ref name="AutoNT-49">{{cite web |url=http://www.immunitysec.com/products-immdbg.shtml |title=Immunity: Knowing You're Secure |url-status=deadusurped |archive-url=https://web.archive.org/web/20090216134332/http://immunitysec.com/products-immdbg.shtml |archive-date=16 February 2009}}</ref>
 
<ref name="AutoNT-50">{{Cite web|url=https://www.coresecurity.com/|title=Core Security|website=Core Security|access-date=10 April 2020|archive-date=9 June 2020|archive-url=https://web.archive.org/web/20200609165041/http://www.coresecurity.com/|url-status=live}}</ref>
 
<ref name="AutoNT-51">{{cite web |url=http://sugarlabs.org/go/Sugar |title=What is Sugar? |publisher=Sugar Labs |access-date=11 February 2012 |archive-date=9 January 2009 |archive-url=https://web.archive.org/web/20090109025944/http://sugarlabs.org/go/Sugar |url-status=live }}</ref>
 
<ref name="AutoNT-52">{{cite web |title=Is Python a good language for beginning programmers? |url=https://docs.python.org/faq/general.html#is-python-a-good-language-for-beginning-programmers |work=General Python FAQ |publisher=Python Software Foundation |access-date=21 March 2007 |archive-date=24 October 2012 |archive-url=https://web.archive.org/web/20121024164224/http://docs.python.org/faq/general.html#is-python-a-good-language-for-beginning-programmers |url-status=live }}</ref>
 
<ref name="AutoNT-53">{{cite web |url=http://www.secnetix.de/~olli/Python/block_indentation.hawk |title=Myths about indentation in Python |publisher=Secnetix.de |access-date=19 April 2011 |archive-date=18 February 2018 |archive-url=https://web.archive.org/web/20180218162410/http://www.secnetix.de/~olli/Python/block_indentation.hawk |url-status=dead }}</ref>
 
<!--ref name="AutoNT-54">{{cite web |url=http://c2.com/cgi/wiki?PythonWhiteSpaceDiscussion |title=White Space Discussion |access-date=1 January 2013}}</ref-->
 
<ref name="AutoNT-55">{{cite web |last=van Rossum |first=Guido |url=http://neopythonic.blogspot.be/2009/04/tail-recursion-elimination.html |title=Tail Recursion Elimination |publisher=Neopythonic.blogspot.be |date=22 April 2009 |access-date=3 December 2012 |archive-date=19 May 2018 |archive-url=https://web.archive.org/web/20180519225253/http://neopythonic.blogspot.be/2009/04/tail-recursion-elimination.html |url-status=live }}</ref>
 
<ref name="AutoNT-56">{{cite web |title=Language Design Is Not Just Solving Puzzles |url=http://www.artima.com/weblogs/viewpost.jsp?thread=147358 |first=Guido |last=van Rossum |date=9 February 2006 |access-date=21 March 2007 |work=Artima forums |publisher=Artima |archive-date=17 January 2020 |archive-url=https://web.archive.org/web/20200117182525/https://www.artima.com/weblogs/viewpost.jsp?thread=147358 |url-status=live }}</ref>
 
<ref name="AutoNT-57">{{cite web |url=https://www.python.org/dev/peps/pep-0342/ |title=PEP 342&nbsp;– Coroutines via Enhanced Generators |last1=van Rossum |first1=Guido |last2=Eby |first2=Phillip J. |date=10 May 2005 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=19 February 2012 |archive-date=29 May 2020 |archive-url=https://web.archive.org/web/20200529003739/https://www.python.org/dev/peps/pep-0342/ |url-status=live }}</ref>
 
<ref name="AutoNT-58">{{cite web |url=https://www.python.org/dev/peps/pep-0380/ |title=PEP 380 |publisher=Python.org |access-date=3 December 2012 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604233821/https://www.python.org/dev/peps/pep-0380/ |url-status=live }}</ref>
 
<ref name="AutoNT-59">{{cite web |url=https://www.python.org/dev/peps/pep-0289/ |title=PEP 289&nbsp;– Generator Expressions |last=Hettinger |first=Raymond |date=30 January 2002 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=19 February 2012 |archive-date=14 June 2020 |archive-url=https://web.archive.org/web/20200614153717/https://www.python.org/dev/peps/pep-0289/ |url-status=live }}</ref>
 
<ref name="AutoNT-60">{{cite web |url=https://www.python.org/dev/peps/pep-0308/ |title=PEP 308&nbsp;– Conditional Expressions |last1=van Rossum |first1=Guido |last2=Hettinger |first2=Raymond |date=7 February 2003 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=13 July 2011 |archive-date=13 March 2016 |archive-url=https://web.archive.org/web/20160313113147/https://www.python.org/dev/peps/pep-0308/ |url-status=live }}</ref>
 
<ref name="AutoNT-61">{{cite web |url=https://docs.python.org/faq/design.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls |title=Why must 'self' be used explicitly in method definitions and calls? |work=Design and History FAQ |publisher=Python Software Foundation |access-date=19 February 2012 |archive-date=24 October 2012 |archive-url=https://web.archive.org/web/20121024164243/http://docs.python.org/faq/design.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls |url-status=live }}</ref>
 
<ref name="classy">{{cite web |title=The Python Language Reference, section 3.3. New-style and classic classes, for release 2.7.1 |access-date=12 January 2011 |url=https://docs.python.org/reference/datamodel.html#new-style-and-classic-classes |archive-date=26 October 2012 |archive-url=https://web.archive.org/web/20121026063834/http://docs.python.org/reference/datamodel.html#new-style-and-classic-classes |url-status=dead }}</ref>
 
<ref name="pep0237">{{cite web |url=https://www.python.org/dev/peps/pep-0237/ |title=PEP 237&nbsp;– Unifying Long Integers and Integers |last1=Zadka |first1=Moshe |last2=van Rossum |first2=Guido |date=11 March 2001 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=24 September 2011 |archive-date=28 May 2020 |archive-url=https://web.archive.org/web/20200528063237/https://www.python.org/dev/peps/pep-0237/ |url-status=live }}</ref>
 
<ref name="AutoNT-62">{{cite web |url=https://python-history.blogspot.com/2010/08/why-pythons-integer-division-floors.html |title=Why Python's Integer Division Floors |date=24 August 2010 |access-date=25 August 2010 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605151500/https://python-history.blogspot.com/2010/08/why-pythons-integer-division-floors.html |url-status=live }}</ref>
 
<ref name="AutoNT-63">{{citation |url=https://docs.python.org/library/functions.html#round |access-date=14 August 2011 |title=round |work=The Python standard library, release 2.7, §2: Built-in functions |archive-date=27 October 2012 |archive-url=https://web.archive.org/web/20121027081602/http://docs.python.org/library/functions.html#round |url-status=live }}</ref>
 
<ref name="AutoNT-64">{{citation |url=https://docs.python.org/py3k/library/functions.html#round |access-date=14 August 2011 |title=round |work=The Python standard library, release 3.2, §2: Built-in functions |archive-date=25 October 2012 |archive-url=https://web.archive.org/web/20121025141808/http://docs.python.org/py3k/library/functions.html#round |url-status=live }}</ref>
 
<ref name="AutoNT-65">{{cite book | title=Python Essential Reference | url=https://archive.org/details/pythonessentialr00beaz_036 | url-access=limited | first1=David M. |last1=Beazley | edition=4th | year = 2009 | page =[https://archive.org/details/pythonessentialr00beaz_036/page/n90 66] |publisher=Addison-Wesley Professional |isbn=9780672329784}}</ref>
 
<ref name="CPL">{{cite book | title=The C Programming Language | first1=Brian W. | last1=Kernighan | first2=Dennis M. | last2=Ritchie |title-link=The C Programming Language | edition=2nd | year=1988 | page=[https://archive.org/details/cprogramminglang00bria/page/206 206] }}</ref>
 
<ref name="AutoNT-66">{{cite web |url=https://www.python.org/dev/peps/pep-0007/ |title=PEP 7&nbsp;– Style Guide for C Code |last=van Rossum |first=Guido |date=5 June 2001 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=24 November 2008 |archive-date=1 June 2020 |archive-url=https://web.archive.org/web/20200601203908/https://www.python.org/dev/peps/pep-0007/ |url-status=live }}</ref>
 
<ref name="AutoNT-67">{{cite web |url=https://docs.python.org/3/library/dis.html#python-bytecode-instructions |title=CPython byte code |publisher=Docs.python.org |access-date=16 February 2016 |archive-date=5 June 2020 |archive-url=https://web.archive.org/web/20200605151542/https://docs.python.org/3/library/dis.html#python-bytecode-instructions |url-status=live }}</ref>
 
<ref name="AutoNT-68">{{cite web |url=http://www.troeger.eu/teaching/pythonvm08.pdf |title=Python 2.5 internals |access-date=19 April 2011 |archive-date=6 August 2012 |archive-url=https://web.archive.org/web/20120806094951/http://www.troeger.eu/teaching/pythonvm08.pdf |url-status=live }}</ref>
 
<ref name="AutoNT-69">{{cite web |url=http://www.oreilly.com/pub/a/oreilly/frank/rossum_1099.html |title=An Interview with Guido van Rossum |publisher=Oreilly.com |access-date=24 November 2008 |archive-date=16 July 2014 |archive-url=https://web.archive.org/web/20140716222652/http://oreilly.com/pub/a/oreilly/frank/rossum_1099.html |url-status=live }}</ref>
 
<ref name="AutoNT-70">{{cite web |url=https://pypy.org/compat.html |title=PyPy compatibility |publisher=Pypy.org |access-date=3 December 2012 |archive-date=6 June 2020 |archive-url=https://web.archive.org/web/20200606041845/https://www.pypy.org/compat.html |url-status=live }}</ref>
 
<ref name="AutoNT-71">{{cite web |url=https://speed.pypy.org/ |title=speed comparison between CPython and Pypy |publisher=Speed.pypy.org |access-date=3 December 2012 |archive-date=10 May 2021 |archive-url=https://web.archive.org/web/20210510014902/https://speed.pypy.org/ |url-status=live }}</ref>
 
<ref name="AutoNT-73">{{cite web |url=http://doc.pypy.org/en/latest/stackless.html |title=Application-level Stackless features PyPy 2.0.2 documentation |publisher=Doc.pypy.org |access-date=17 July 2013 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604231513/https://doc.pypy.org/en/latest/stackless.html |url-status=live }}</ref>
 
<ref name="AutoNT-74">{{cite web |url=https://code.google.com/p/unladen-swallow/wiki/ProjectPlan |title=Plans for optimizing Python |work=Google Project Hosting |date=15 December 2009 |access-date=24 September 2011 |archive-date=11 April 2016 |archive-url=https://web.archive.org/web/20160411181848/https://code.google.com/p/unladen-swallow/wiki/ProjectPlan |url-status=live }}</ref>
 
<ref name="AutoNT-86">{{cite web |first=Przemyslaw |last=Piotrowski |url=http://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html |title=Build a Rapid Web Development Environment for Python Server Pages and Oracle |work=Oracle Technology Network |publisher=Oracle |date=July 2006 |access-date=12 March 2012 |archive-date=2 April 2019 |archive-url=https://web.archive.org/web/20190402124435/https://www.oracle.com/technetwork/articles/piotrowski-pythoncore-084049.html |url-status=live }}</ref>
 
<ref name="AutoNT-88">{{cite web |url=https://www.python.org/dev/peps/pep-0327/ |title=PEP 327&nbsp;– Decimal Data Type |last=Batista |first=Facundo |date=17 October 2003 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=24 November 2008 |archive-date=4 June 2020 |archive-url=https://web.archive.org/web/20200604234830/https://www.python.org/dev/peps/pep-0327/ |url-status=live }}</ref>
 
<ref name="AutoNT-89">{{cite web |url=https://www.python.org/dev/peps/pep-0333/ |title=PEP 333&nbsp;– Python Web Server Gateway Interface v1.0 |last=Eby |first=Phillip J. |date=7 December 2003 |work=Python Enhancement Proposals |publisher=Python Software Foundation |access-date=19 February 2012 |archive-date=14 June 2020 |archive-url=https://web.archive.org/web/20200614170344/https://www.python.org/dev/peps/pep-0333/ |url-status=live }}</ref>
 
<ref name="AutoNT-90">{{cite web |url=http://boo.codehaus.org/Gotchas+for+Python+Users |title=Gotchas for Python Users |work=boo.codehaus.org |publisher=Codehaus Foundation |access-date=24 November 2008 |url-status=dead |archive-url=https://web.archive.org/web/20081211062108/http://boo.codehaus.org/Gotchas+for+Python+Users |archive-date=11 December 2008}}</ref>
 
<ref name="AutoNT-91">{{cite web |url=http://cobra-language.com/docs/acknowledgements/ |title=Acknowledgements |last=Esterbrook |first=Charles |work=cobra-language.com |publisher=Cobra Language |access-date=7 April 2010 |archive-date=8 February 2008 |archive-url=https://web.archive.org/web/20080208141002/http://cobra-language.com/docs/acknowledgements/ |url-status=live dead}}</ref>
 
<!-- <ref name="AutoNT-9293">{{cite web |url=http://cobrawiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators |archive-languageurl=https://web.comarchive.org/docsweb/python20071020082650/ |titlehttp://wiki.ecmascript.org/doku.php?id=Comparison to Pythonproposals:iterators_and_generators |lasturl-status=Esterbrookdead |firstarchive-date=Charles20 October 2007 |worktitle=cobra-language.comProposals: iterators and generators [ES4 Wiki&#93; |publisher=Cobra Languagewiki.ecmascript.org |access-date=724 AprilNovember 20102008}}</ref>-->
 
<ref name="AutoNT-94">{{cite news |url=https://techcrunch.com/2009/11/10/google-go-language/ |title=Google's Go: A New Programming Language That's Python Meets C++ |last=Kincaid |first=Jason |date=10 November 2009 |work=TechCrunch |access-date=29 January 2010 |archive-date=18 January 2010 |archive-url=https://web.archive.org/web/20100118014358/http://www.techcrunch.com/2009/11/10/google-go-language/ |url-status=live}}</ref>
<ref name="AutoNT-93">{{cite web |url=http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators |archive-url=https://web.archive.org/web/20071020082650/http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators |url-status=dead |archive-date=20 October 2007 |title=Proposals: iterators and generators [ES4 Wiki&#93; |publisher=wiki.ecmascript.org |access-date=24 November 2008 }}</ref>
 
<ref name="AutoNT-9495">{{cite newsweb |urllast=https://techcrunch.com/2009/11/10/google-go-language/Strachan |titlefirst=Google'sJames Go:|date=29 AAugust New2003 Programming|title=Groovy&nbsp;– Languagethe That'sbirth Pythonof Meetsa C++new |last=Kincaiddynamic |first=Jasonlanguage |date=10for Novemberthe 2009Java |work=TechCrunchplatform |access-dateurl=http://radio.weblogs.com/0112098/2003/08/29 January 2010.html |archiveaccess-date=1811 JanuaryJune 20102007 |archive-url=https://web.archive.org/web/2010011801435820070405085722/http://wwwradio.techcrunchweblogs.com/20090112098/112003/1008/google-go29.html |archive-language/date=5 April 2007 |url-status=live dead}}</ref>
 
<ref name="AutoNT-95linuxdevcenter">{{cite web |lasturl=Strachanhttp://www.linuxdevcenter.com/pub/a/linux/2001/11/29/ruby.html |firsttitle=JamesAn |date=29Interview August 2003 |title=Groovy&nbsp;–with the birthCreator of a new dynamic language for the Java platformRuby |urlpublisher=http://radio.weblogsLinuxdevcenter.com/0112098/2003/08/29.html |access-date=113 JuneDecember 20072012 |archive-date=28 April 2018 |archive-url=https://web.archive.org/web/2007040508572220180428150410/http://radiowww.weblogslinuxdevcenter.com/0112098pub/2003a/08linux/2001/11/29/ruby.html |archive-date=5 April 2007 |url-status=dead live}}</ref>
 
<ref name="linuxdevcenterAutoNT-99">{{cite web |url=http://www.linuxdevcentertcl.comtk/pubcgi-bin/atct/linuxtip/2001/11/29/ruby3.html |title=AnTIP Interview#3: withTIP theFormat Creator|last1=Kupries of|first1=Andreas Ruby|last2=Fellows |publisherfirst2=LinuxdevcenterDonal K.com |work=tcl.tk |publisher=Tcl Developer Xchange |date=14 September 2000 |access-date=324 DecemberNovember 20122008 |archive-date=2813 AprilJuly 20182017 |archive-url=https://web.archive.org/web/2018042815041020170713233954/http://wwwtcl.linuxdevcenter.comtk/pub/acgi-bin/linuxtct/2001tip/11/29/ruby3.html |url-status=live }}</ref>
 
<ref name="AutoNT-99100">{{cite web |url=http://www.tclerlang.tkorg/cgieeps/eep-bin/tct/tip/30001.html |title=TIPEEP #31: TIPEEP FormatPurpose and Guidelines |last1=KupriesGustafsson |first1=AndreasPer |last2=FellowsNiskanen |first2=Donal K.Raimo |workpublisher=tclerlang.tk |publisher=Tcl Developer Xchangeorg |date=1429 SeptemberJanuary 20002007 |access-date=2419 NovemberApril 20082011 |archive-date=1315 JulyJune 20172020 |archive-url=https://web.archive.org/web/2017071323395420200615153206/http://tclerlang.tkorg/cgieeps/eep-bin/tct/tip/30001.html |url-status=live }}</ref>
 
<ref name="AutoNTlj-100bdfl-resignation">{{cite webmagazine |url=httphttps://www.erlanglinuxjournal.orgcom/eepscontent/eepguido-0001.htmlvan-rossum-stepping-down-role-pythons-benevolent-dictator-life |title=EEPGuido 1:van EEPRossum PurposeStepping andDown Guidelinesfrom |last1=GustafssonRole |first1=Peras Python's Benevolent Dictator For Life |last2last=NiskanenFairchild |first2first=RaimoCarlie |publishermagazine=erlang.orgLinux Journal |date=2912 JanuaryJuly 20072018 |access-date=1913 AprilJuly 20112018 |archive-date=1513 JuneJuly 20202018 |archive-url=https://web.archive.org/web/2020061515320620180713192427/httphttps://erlangwww.orglinuxjournal.com/eepscontent/eepguido-0001.htmlvan-rossum-stepping-down-role-pythons-benevolent-dictator-life |url-status=live }}</ref>
 
<!-- <ref name="AutoNT-101">{{cite web |url=http://www.tiobe.com/index.php/content/paperinfo/tpci/ |title=TIOBE Programming Community Index for March 2012 |date=March 2012 |publisher=TIOBE Software |access-date=25 March 2012}}</ref>-->
 
<ref name="lj-bdfl-resignation">{{cite magazine |url=https://www.linuxjournal.com/content/guido-van-rossum-stepping-down-role-pythons-benevolent-dictator-life |title=Guido van Rossum Stepping Down from Role as Python's Benevolent Dictator For Life |last=Fairchild |first=Carlie |magazine=Linux Journal |date=12 July 2018 |access-date=13 July 2018 |archive-date=13 July 2018 |archive-url=https://web.archive.org/web/20180713192427/https://www.linuxjournal.com/content/guido-van-rossum-stepping-down-role-pythons-benevolent-dictator-life |url-status=live }}</ref>
 
}}
 
===Sources===
* {{cite web |url=https://wiki.python.org/moin/PythonForArtificialIntelligence |title=Python for Artificial Intelligence |publisher=Python Wiki.python.org |date=19 July 2012 |access-date=3 December 2012 |url-status=dead |archive-url=https://web.archive.org/web/20121101045354/http://wiki.python.org/moin/PythonForArtificialIntelligence |archive-date=1 November 2012 }}
* {{cite journal |editor-last=Paine |editor-first=Jocelyn |title=AI in Python |journal=AI Expert Newsletter |publisher=Amzi! |date=August 2005 |url=http://www.ainewsletter.com/newsletters/aix_0508.htm#python_ai_ai |access-date=11 February 2012 |archive-url=https://web.archive.org/web/20120326105810/http://www.ainewsletter.com/newsletters/aix_0508.htm#python_ai_ai |archive-date=26 March 2012 |url-status=dead }}
* {{cite web |url=https://pypi.python.org/pypi/PyAIML |title=PyAIML 0.8.5 : Python Package Index |publisher=Pypi.python.org |access-date=17 July 2013}}
* {{cite book |title=Artificial Intelligence: A Modern Approach |last1=Russell |first1=Stuart J. |author-link1=Stuart J. Russell |last2=Norvig |first2=Peter |author-link2=Peter Norvig |name-list-style=amp |edition=3rd |year=2009 |publisher=Prentice Hall |___location=Upper Saddle River, NJ |isbn=978-0-13-604259-4 }}
 
==Further reading==
Line 688 ⟶ 762:
7. Neutrality on the part of editors is essential. In terms of major debates, items representing all major positions should be included, with annotations indicating the specific POV of each. We may have to work out rules where topic disputes are irreconcilable.
-->
* {{cite book |last=Downey |first=Allen B. |title=Think Python: How to Think Like a Computer Scientist |edition=Version 1.6.63rd |date=MayJuly 20122024 |publisher=O'Reilly Media |isbn=978-0-521-72596-51098155438 |url=https://allendowney.github.io/ThinkPython/}}
* {{cite book |last=Lutz |first=Mark |title=Learning Python |publisher=O'Reilly Media |year=2013 |edition=5th |isbn=978-0-596-15806-4}}
* {{cite news |url=http://www.computerworld.com.au/index.php/id;66665771 |title=The A-Z of Programming Languages: Python |last=Hamilton |first=Naomi |date=5 August 2008 |work=Computerworld |access-date=31 March 2010 |url-status=dead |archive-url=https://web.archive.org/web/20081229095320/http://www.computerworld.com.au/index.php/id%3B66665771 |archive-date=29 December 2008}}
* {{cite book |last=LutzSummerfield |first=Mark |title=LearningProgramming in Python 3 |publisher=O'Reilly MediaAddison-Wesley Professional|year=2013 2009|edition=5th 2nd|isbn=978-0-596321-1580668056-4 3}}
* {{cite book |last=PilgrimRamalho |first=MarkLuciano |title=Dive intoFluent Python |publisherurl=Apresshttps://www.thoughtworks.com/insights/books/fluent-python-2nd-edition |yeardate=2004May 2022 |publisher=O'Reilly Media |isbn=978-1-590594920-3565632-1 |url-access=registration |url=https://archive.org/details/diveintopython0000pilg 4}}
* {{cite book |last=Pilgrim |first=Mark |title=Dive into Python 3 |publisher=Apress |year=2009 |isbn=978-1-4302-2415-0 }}
* {{cite book |last=Summerfield |first=Mark |title=Programming in Python 3 |publisher=Addison-Wesley Professional|year=2009|edition=2nd|isbn=978-0-321-68056-3 }}
 
==External links==
<!--
{{No more links}}
PLEASE BE CAUTIOUS IN ADDING MORE LINKS TO THIS ARTICLE. Wikipedia is not a collection of links nor should it be used for advertising.
 
Excessive or inappropriate links WILL BE DELETED. See [[Wikipedia:External links]] & [[Wikipedia:Spam]] for details.
<!-- ===================== {{No more links}} =========================
| PLEASE BE CAUTIOUS IN ADDING MORE LINKS TO THIS ARTICLE. Wikipedia |
| is not a collection of links nor should it be used for advertising. |
| |
| Excessive or inappropriate links WILL BE DELETED. |
| See [[Wikipedia:External links]] & [[Wikipedia:Spam]] for details. |
| |
| If there are already plentiful links, please propose additions or |
| replacements on this article's discussion page, or submit your link |
| to the relevant category at the Open Directory Project (dmoz.org) |
| and link back to that category using the {{Dmoz}} template. |
========================== {{No more links}} ====================== -->
 
If there are already plentiful links, please propose additions or replacements on this article's discussion page, or submit your link to the relevant category at Curlie, formerly the Open Directory Project (dmoz.org) and link back to that category using the {{Curlie}} template.
{{Sister project links |wikt=no |display=Python |commons=Category:Python (programming language) |b=Python Programming |n=no |s=no |voy=no |species=no |d=Q28865}}
{{No more links}}
-->
 
{{Sister project links |wikt=no |display=Python |commons=Category:Python (programming language) |b=Python Programming |n=no |s=no |voy=no |species=no |d=Q28865}}
* {{Official website}}
* [https://docs.python.org/3/tutorial/ The Python Tutorial]
 
{{Python (programming language)|state=expanded}}
Line 720 ⟶ 789:
{{Statistical software}}
{{Numerical analysis software}}
 
{{Authority control}}
 
[[Category:Python (programming language)| ]]
[[Category:Articles with example Python (programming language) code]]
[[Category:Class-based programming languages]]
[[Category:ComputationalNotebook notebookinterface]]
[[Category:Computer science in the Netherlands]]
[[Category:Concurrent programming languages]]
Line 737 ⟶ 806:
[[Category:Multi-paradigm programming languages]]
[[Category:Object-oriented programming languages]]
[[Category:Pattern matching programming languages]]
[[Category:Programming languages]]
[[Category:Programming languages created in 1991]]
[[Category:Scripting languages]]
[[Category:Text-oriented programming languages]]
[[Category:Monty Python references]]
{{Good article}}