We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Python 2 vs. Python 3

One thing that's important to keep in mind as you continue your Python journey is that the Python ecosystem is fragmented. Python 3 was released on December 3, 2008, but 15+ years later, the web is still full of Python 2 dependencies, scripts and tutorials!

In this course, we used Python 3 – just like any good citizen should these days.

One of the most obvious breaking changes between Python 2 and 3 is the syntax for printing text to the console.

Python 2

print "hello world"

Python 3

print("hello world")

Assignment

Update the code from Python 2 to Python 3 syntax.