Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 0.3 — Python Versions and the Version Tags in This Course
Python · Example 2 of 3 Python 3.10+

A feature with a version: match

The badge says this needs Python 3.10 or newer. Change command to "stop" and run again. Topic 2.8 teaches match properly.

Python gets a new version every October, and each version is supported for about five years. This course runs Python 3.13 in your browser and marks every newer feature with a badge such as Python 3.10+, so you always know which Python a piece of code needs.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 5 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Write a program that prints Modern Python if the running Python is 3.12 or newer and Older Python otherwise. (Copy the if and else shape from the first example in this topic; Phase 2 teaches it.)

02

Write a program that prints the running version in the form Python 3.13 using sys.version_info.major and sys.version_info.minor.

03

Put these versions in order from oldest to newest: 3.9, 3.14, 3.10, 3.8.

Explain it without notes

01

What do the three numbers in Python 3.13.2 mean?

02

How often is a new Python version released, and how long is each one supported?

03

Someone's code works on their machine but gives you a SyntaxError on a line with match. What is the most likely cause and how do you confirm it?

04

What does a badge such as "Python 3.10+" mean in this course?

A feature with a version: match Python 3.10+
Sign in to run this example in your browser.

Expected output

Starting