O'Reilly logo

Python: Visual QuickStart Guide, Second Edition by Toby Donaldson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Comparing Python 2 and Python 3

Python 3 was released at the end of 2008 and marks a major update to Python. Some of the changes introduced in Python 3 break backward compatibility with earlier versions of Python, so to ease the transition for current Python developers, the development of Python 2 has continued in parallel with the newer Python 3.

In this chapter, we’ll summarize some of the main changes to Python 3 and also explain how you can convert a Python 2 program to Python 3.

What’s New in Python 3

Python 3 introduces many new features; the following are some of the most visible:

  • Python 3’s print function is indeed a function. In Python 2, print was a language construct, similar to if and for. The problem with Python 2’s print ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required