USE ONLY IF YOUR QUESTION IS VERSION-SPECIFIC. For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag on all Python questions. Use the [python-2.x] tags for Python 2 questions.
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 python 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 python tag, use python-2.x or python-3.x. If you believe your question may be even more specific, you may include a version specific tag, such as python-3.5.
Please do not mix python-2.x (or a more specific tag such as python-2.7 and python-3.x (ditto) unless you are specifically asking a question about an interoperability problem between versions.
Python Free Tutorials
- codecademy
- Python Tutorial(Pdf) By Guido van Rossum
- "The Python Tutorial" from Python 3 Documentation
Python Online Books
Python API Reference
Python Online IDE
- repl.it Python
- ideone - An online IDE with other popular language support.