Loading video player…

A History of Python Versions and Features (Overview)

This course gives you a direct, practical overview of how Python has evolved—what changed in each major version, why it matters, and how to use the features that define modern Python. You’ll see both the historical context and hands-on code, so you understand not just what changed, but why and how to use it today.

In this course, you’ll learn:

  • Key new features introduced in every major Python version, starting from early Python 1 up through Python 3.14
  • The story behind pivotal changes, like list comprehensions, exception handling, the with statement, defaultdict, and the transition from Python 2 to Python 3
  • Hands-on use of modern Python tools: f-strings, dataclasses, the walrus operator (:=), match/case structural pattern matching, and new types like enum and pathlib
  • How to leverage improvements in each Python release for cleaner, faster, and more maintainable code
  • What’s coming in the latest Python releases, including t-strings and REPL improvements

What’s New in Python Docs

More at Real Python

Download

Course Slides (.pdf)

1.5 MB
Download

Sample Code (.zip)

5.2 KB

00:00 Welcome to a History of Python Versions and Features. This is a coding conversation course. My name is Christopher Trudeau, and my name is Christopher Bailey, and we’ll be taking you on a little journey through the Python language over the last 35 years, highlighting what features got added to the language when and how some of them work.

00:19 Although this course is formatted as a language history lesson, it also works as an overview of a whole load of features. Some you might know and some you might not.

00:28 In this course, you’ll learn about context managers and the with keyword, defaultdict, Python 2 to 3, transition, yield from, unittest.mock enums, pathlib, f-strings, data classes, the walrus operator, match-case statements, type hints, and more.

00:51 For the most part, the code in this course was tested using Python 3.13.5. Some of the older stuff meant I had to install an ancient interpreter, and at the end you’ll see some of the newer stuff coming out in the fall of 2025 with Python 3.14.

01:06 So Python was created by Guido van Rossum, and this is the announcement that Guido sent out on comp.lang.misc in 1994. Tired of deciphering the Perl code you wrote last week?

01:19 Frustrated with Bourne Shell syntax? Spent too much time staring at core dumps lately? Maybe you should try Python, the next generation object-oriented scripting and prototyping language with a readable syntax.

01:31 Python has been used by hundreds of happy users all over the world during the past three years and is now ready for prime time.

01:40 Python 1.0, 1994, basic function syntax was the same as you’re used to. It included a REPL; that’s a read-evaluate -print loop if you’re not familiar with that.

01:52 It included exceptions, but they were very much bare bone at the time, no classes yet, and a fairly comprehensive standard library, which is still one of the features that people enjoy about Python.

02:05 So we’re going to dig into Python 2.0, which was introduced in 2000. They’ve added Unicode support through the u prefix. Added one of many people’s favorite features of Python, which is the list comprehensions and added methods for strings.

02:20 Python 2.1 introduced in April of 2001, added nested variable scopes. So if you’re familiar with the scopes in Python and the idea of local, enclosing, global and built-in scopes, that’s where this is starting to be introduced.

02:36 And then also rich comparisons were added. This includes the special methods of the __lt__, which is less than, __le__, __eq__ and so forth. With the introduction of Python 2.2 in December of 2001, the new style of classes was introduced.

02:55 Integer division using // and generators were introduced. Python 2.3, a couple of years later in July of 2003, added the Boolean data type and added sets as a data type in a module.

03:09 Along with that, added the enumerate() function.

03:14 To learn more about some of the features covered in this course, there will be deep dive links throughout. All of these are available in the notes below the course.

03:21 The first set of links I want to talk about are the official what’s new in Python docs. Every release of Python comes with one and it includes loads of information on what is in the release.

03:33 The format of the link is the same for each release, so whatever version you want to see, just substitute the number in the end part of the URL. You’ll notice there’s also a three earlier in the URL even for 2.x releases.

03:46 This got added when Python transitioned to version 3 to differentiate it from the older docs, but they did port the what’s new of older versions to the new doc format.

03:57 So you can just leave that first three alone and edit the version to find the one you’re looking for.

04:04 In addition to outside links, there is also tons of content at Real Python. If you’d like to learn more about rich comparisons and the dunder methods that achieve them, this course and article has loads of info.

04:17 Or if you’d like to learn about list comprehensions that got added way back in 2.0, this course and tutorial will teach you all about them. They’re a good tool to know as they often outperform their for loop equivalents.

04:31 Continuing more about Python 2, Python 2.4 was introduced in November of 2004, and the set moved from being a module that was imported to as a native data type function.

04:42 Decorators were added and the reversed() function was added to allow the reversing of iterables.

04:51 There’s lots more at Real Python here for you. If you’d like to learn about Python decorators, this is one of the first courses I did for Real Python, and I learned a ton and I think you’ll learn a ton from it.

05:01 And there’s a much more detailed tutorial by Geir Arne Hjelle that goes into a lot more examples that you can kind of dive much deeper into. As we progress along, that little guitar symbol will show you courses that Christopher Bailey himself did.

05:16 And if you want to learn more about using sets in Python, we have a written tutorial and a course on it.

05:24 In the next lesson, we’ll continue on with Python 2.5 covering context managers and the with keyword, as well as talking about the defaultdict from collections.

Become a Member to join the conversation.