Python 2.x

The legacy version you may still meet in old codebases.

💡
This course has 3 lessons. Start with the first one and use the next / previous links at the bottom of each lesson — the sidebar keeps the whole course in order.

Lessons

  1. The print statement and integer divisionTwo Python 2 behaviours that change results without a warning: print as a statement, and division that floors between integers.
  2. unicode and str are different thingsPython 2 has a bytes type called str and a text type called unicode, plus hidden ASCII conversions that fail on any non-ASCII input.
  3. Migrating to Python 3The concrete changes between the versions, the automated tools, and the semantic diffs a compiler will not catch.

More in Python & Data Science

Python 3 NumPy pandas Matplotlib Jupyter Notebook Flask FastAPI Django SciPy Pillow R Julia

Last refreshed 2026-09-17.