Skip to main content

DO NOT USE UNLESS YOUR QUESTION IS FOR PYTHON 3 ONLY. Always use alongside the standard [python] tag.

Python is a widely-used, interpreted, object-oriented, and high-level programming language with dynamic semantics, used for general-purpose programming. It was created by Guido van Rossum, and first released on February 20, 1991. Python 3 is the latest version of the Python programming language, first released on December 3rd, 2008. It features simplifications and improvements to the syntax of the language. Some of these changes are backwards incompatible, and therefore Python 3 has its own tag.

Although Python 3 is now the recommended and supported version of the language, some users still remain on version 2.7 for various reasons. If you start new projects or begin to learn Python, version 3 is now the recommended target under normal circumstances:

Python 3 is strongly recommended for any new development. As of January 2020, Python 2 has reached End Of Life status, meaning it will receive no further updates or bugfixes, including for security issues. Many frameworks and other add on projects are following a similar policy. As such, we can only recommend learning and teaching Python 3.

One of the main differences is in the print statement.

Python 2:

print "Hello World"

Python 3:

print("Hello World")

For more information on the differences, see Porting Python 2 Code to Python 3.

For information on Python in general, visit the main Python tag wiki.


Tagging recommendation:

Use the tag for all Python related questions. If you believe your question includes issues specific to the incompatible Python 2.x or Python 3.x, in addition to the main tag, use or . If you believe your question may be even more specific, you may include a version specific tag, such as .

Please do not mix (or a more specific tag such as ) and (ditto) unless you are specifically asking a question about an interoperability problem between versions.

Python Free Tutorials

Python Online Books

Python API Reference

Python Online IDE

Python Package Index

Code Language (used for syntax highlighting): lang-py