Fork me on GitHub

Python 2 or 3?

The Python programming language is currently in the midst of a long-term transition from version 2 to version 3. New programmers typically have many questions about which version they should learn. It's confusing to hear that Python 3, which was originally released in 2008, is still not the default installation on many operating systems.

Here's the good news: you can't go wrong starting with either version. While there are differences in unicode and syntax, for the most part if you start with Python 2 and then learn Python 3 you won't be starting from scratch. Likewise, you'll be able to read and write Python 2 code if you started with Python 3.

My personal recommendation for new programmers as of right now is to start with Python 3. There are enough great resources out there that teach version 3 from the ground up.

However, if you are interested in DevOps-type work with configuration management tools such as Ansible or Fabric, then you'll have to stick to Python 2 because they have yet to upgrade to support Python 3. If you know there are libraries you must use in a project, check the Python Walls of Superpowers. If you're using Django, there is also a wall specifically for Python 3 compatibility of popular Django packages.

Python 2 to 3 resources

What's next now that you know about Python versions?

What editor should I use to code my Python app?

I want to learn how to code a Python web application using a framework.

Show me a list of the best Python learning resources.

Sign up here to receive an email with major updates to this site and Python tutorials delivered to your inbox once a month.