Post image
Light Mode
Dark Mode
Python's Future, Features, & Fun

Hello, checkiomates๐Ÿฑโ€๐Ÿ‘ค!

This week in Python, we delve into the exciting advancements of free-threaded Python discussed at the 2025 Language Summit, explore a clever dict implementation that tracks unused keys for cleaner code, and learn best practices for structuring your Python scripts. To cap it off, we present a dynamic mission: implementing the classic Ghost Leg (Amidakuji) algorithm to simulate its path-following and list-reordering magic.

๐Ÿ’กTIP

On Easy difficulty, each of the few starting stations is dedicated to a distinct data type.
If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!

๐Ÿ MISSION

Follow Ghost Legs by kurosawa4434 -

Ghost leg is a well-known method used to get random results. This mechanism has the effect of changing the order in the list. Follow the ghost legs and return a list of converted numbers.

follow_ghost_legs(3, [(1, 2), (2, 3), (1, 2)]) == [3, 2, 1]
follow_ghost_legs(4, [(2, 3), (1, 2), (2, 3), (3, 4)]) == [3, 2, 4, 1]
follow_ghost_legs(5, [(3, 4), (4, 5), (3, 4), (2, 3), (3, 4)]) == [1, 5, 4, 2, 3]

๐Ÿ“– ARTICLES

State of Free-Threaded Python -

This is a blog post from the Python Language Summit 2025 giving an update on the progress of free-threaded Python.

A Python dict that can report which keys you did not use -

This can come in handy if you're working with large Python objects and you want to be certain that you're either unit testing everything you retrieve or certain that all the data you draw from a database is actually used in a report.

How Can You Structure Your Python Script? -

Structure your Python script like a pro. This guide shows you how to organize your code, manage dependencies with PEP 723, and handle command-line arguments.

๐Ÿ‘ฉโ€๐Ÿ’ปCODE SHOT

What do you think the following code does?

from itertools import accumulate
from operator import sub

def ??????????(stock: list[int]) -> int:
    return max(map(sub, stock, accumulate(stock, min)))

๐Ÿ™Œ Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! โคต

Created: June 24, 2025, 5:08 p.m.
1
40
User avatar
freeman_lex