Play this short quiz to test your Python knowledge!
At PyCon Lithuania 2026 I did a lightning talk where I presented a “Who wants to be a millionaire?” Python quiz, themed around iterables.
There's a whole performance during the lightning talk...
This article shares two skills you can add to your coding agents so they use uv workflows.
I have fully adopted uv into my workflows and most of the time I want my coding agents to use uv workflows as well, like when running any Python code or...
Learn how objects are automatically iterable if you implement integer indexing.
Introduction
An iterable in Python is any object you can traverse through with a for loop.
Iterables are typically containers and iterating over the iterable object allows...
This article covers a useful LLM pattern where you ask the LLM to write code to solve a problem instead of asking it to solve the problem directly.
The problem of merging two transcripts
I had two files that contained two halves of the transcript of...
See an animation of a trapezoid innscribed in a circle, built with some maths and the help of an LLM.
The animation
My brother asked for my help to build an animation of a trapezoid inscribed in a circle that kept changing his shape.
With a bit of...
Today I learned that cyclic quadrilaterals have supplementary opposite angles.
A cyclic quadrilateral — a quadrilateral whose four vertices all lie on a single circle — has supplementary opposite angles.
This means that opposite angles add to 180...
Today I learned how to inspect a lazy import object in Python 3.15.
Python 3.15 comes with lazy imports and today I played with them for a minute.
I defined the following module mod.py:
print("Hey!")
def f():
return "Bye!"
Then,...
Today I learned how to install jupyter properly while using uv to manage tools.
Running a Jupyter notebook server or Jupyter lab
To run a Jupyter notebook server with uv, you can run the command
$ uvx jupyter notebook
Similarly, if you want to run...
Today I learned how to do multiline input in the REPL using an uncommon combination of arguments for the built-in open.
A while ago I learned I could use open(0) to open standard input.
This unlocks a neat trick that allows you to do multiline input...
Learn how to remove extra spaces from a string using regex, string splitting, a fixed point, and itertools.groupby.
In this article you'll learn about three different ways in which you can remove extra spaces from the middle of a string.
That is,...