Mulled Wine, Mince Pies, and More Python
2025 in review here on The Python Coding Stack
I’ve been having too much mulled wine. And wine of the standard type. And aperitifs before meals and digestifs after them…the occasional caffé corretto, too. You get the picture…
No wonder I can’t remember what articles I wrote this year here at The Python Coding Stack. So make sure you adjust your expectations for this end-of-year review post.
Parties and Gatherings
And there’s another thing I can never remember, especially at this time of year when large-ish gatherings are more common. How many people are needed in a group to have a probability greater than 50% that two people share a birthday? This could be an ice-breaker in some awkward gatherings, but only if you’re with a geeky crowd. Although the analytical proof is cool, writing Python code to explore this problem is just as fun. Here’s my article from February exploring the Birthday Paradox:
On Shared Birthdays (and a Bit on Pythagorean Triplets) • Pythonic Code
You know what they say about buses. You wait for ages, and then two arrive at once. Or is it three? In any case, I had a similar experience with a specific Python tool over a two-day period last week.
This post also explores some tools from the itertools module. Iteration in Python is different from its implementation in many other languages. And the itertools module provides several tools to iterate in a Pythonic way. Later in the year, I explored more of these tools in The itertools Series. Here’s the first post, exploring Yteria’s adventures in a world a bit similar to ours, yet different:
Loss of Words • A Nested Journey (#1 in The `itertools` Series • `product()`)
She slammed the door and leaned against it as if to make sure it stayed closed. Now she was back in her flat, she could pause to catch her breath. But she was still shaking.
Here’s the whole series following Yteria’s other adventures and the itertools module:
Christmas Decorations
And something else you can’t avoid at this time of year is all the Christmas decorations you’ll find everywhere. Christmas trees, flashing lights, street displays, and…
…Python has its own decorations. You can adorn functions with Python’s equivalent of tinsel and angels:
Demystifying Decorators • They Don't Need to be Cryptic
I avoided decorators for so long. First, I pretended they didn't exist. Then, I treated them like a magic spell—I'd use some of the common ones and simply copy how they're used in the documentation. And each time I tried to learn how they work, I'd give up pretty quickly.
This post is the most-read post on The Python Coding Stack in 2025. It also has a follow-up post that explores more:
Python’s decorators don’t necessarily make functions pretty—they make them more versatile. However, Python’s f-strings are there to make displayed outputs look pretty. And what if you want your own custom fancy f-string format specifiers?
I Want My Own Fancy F-String Format Specifiers… Sure You Can
You'd be surprised to know how much of what I plan and write doesn't make the cut. I'm working on an article about properties–you'll read it soon–and I went down a rabbit hole–I often do–as I was exploring the code to present in that article. It didn't take long to realise that I'll have to axe it from the article…
Endless Visits to Coffee Shops
I spend a lot of time in coffee shops over the holidays. It’s a great place to meet people for a quick catch-up. And to drink coffee. Coffee featured a few times in articles this year here on The Python Coding Stack.
One of these coffee-themed posts followed Alex’s experience with opening his new coffee shop and explored parameters and arguments in Python functions:
A Story About Parameters and Arguments in Python Functions • "AI Coffee" Grand Opening This Monday
Alex had one last look around. You could almost see a faint smile emerge from the deep sigh—part exhaustion and part satisfaction. He was as ready as he could be. His new shop was as ready as it could be. There was nothing left to set up. He locked up and headed home. The grand opening was only seven hours away, and he'd better get some sleep.
Another one narrates one of my trips to a coffee shop and how it helped me really understand the difference between == and is in Python—equality and identity:
The One About the £5 Note and the Trip to the Coffee Shop • The Difference Between `is` and `==` in Python
I met a friend in a coffee shop the other day. One of those small, quaint cafés with comfy armchairs and books on the walls that you can pick up and read–the books, not the walls–while sipping your hot beverage of choice.
Board Games
Who doesn’t play board games over the holidays? We certainly do. And that means we need a dictionary present to resolve Scrabble-related disagreements. This year, we also played Boggle, another word-based game. So, the dictionary had to work overtime.
And dictionaries work overtime in Python, too. They’re one of the most important built-in data structures. Here’s a question: Are Python dictionaries ordered? The answer is more nuanced than you might think at first:
And to understand how Python dictionaries work, it’s best to understand hashability:
The Misunderstood Hashable Types and Why Dictionaries Are Called Dictionaries • [Club]
Pick up a dictionary. No, not that one. The real dictionary you have on your bookshelf, the one that has pages made of paper, which you use to look up the meaning of English words. Or whatever other language. But let’s assume it’s an English dictionary. Now, look up
This article is part of The Club, the special area on The Python Coding Stack for premium members. The Club launched this year and includes more articles, an exclusive forum, videos, and more… This premium content is in addition to the free articles, which will always remain a key part of The Python Coding Stack. To make sure you don’t miss a thing here on The Python Coding Stack, join The Club by becoming a premium subscriber:
And it’s not just dictionaries that play an important role in Python. Indeed, in Python, we often prefer to focus on what a data type can do rather than what it is. Here’s another short post in The Club on this topic:
Unwanted Gifts?
Did you receive gifts you don’t need or want? Or perhaps, you have received the same gift more than once? Python can help, too. Let’s start by removing duplicate presents from the Christmas tree list:
I Want to Remove Duplicates from a Python List • How Do I Do It?
Another short article today to figure out ways to remove duplicate values from a list. The ideal solution depends on what you really need.
And what about the used wrapping paper and food packaging? You can recycle some of it. But some must end up in the garbage. Python has its own trash bin, too:
When You No Longer Need That Object • Dealing With Garbage in Python
How often have you heard the phrase "Everything is an object in Python"? We often talk about how to create objects in Python. After all, Python is an object-oriented language (even when you don't define your own classes).
Magic
This time of year can feel magical. And maybe it’s for this reason that TV stations here keep showing the Harry Potter films during the Christmas holiday season. I’m a Harry Potter fan, and I’ve written Harry Potter-themed posts and series in the past. And there was one this year, too:
Hermione's Undetectable Extension Charm: Revealed (Using Python)
Raise your hand if you're a Harry Potter fan. Those of you with your hands still down–what are we going to do with you?! I'll let you stay and read on, but seriously…
One thing that’s not magic in Python is its behind-the-scenes operations. Python’s special methods deal with this, and once you know the trick, it’s no longer magic. Here’s a post that explores some of these special methods:
Creating a Singleton Class in Python And Why You (Probably) Don’t Need It
If you spend long enough in the programming world, you’ll come across the term singleton at some point. And if you hadn’t seen this term yet, well, now you have!
Queueing in The Cold
I avoided queueing in the cold this year, but I’ve done this so many times in past Christmas holidays. Queueing for a skating rink or for a Christmas fair. Queueing to get mulled wine from a street stall. If you could skip the queue, would you?
If You Love Queuing, Will You Also Love Priority Queuing? • [Club]
You provide three tiers to your customers: Gold, Silver, and Bronze. And one of the perks of the higher tiers is priority over the others when your customers need you.
And if it’s cold, you’ll need to zip your jacket well. Python’s zipping and unzipping also feature in this year’s posts:
What's the Difference Between Zipping and Unzipping Your Jacket? • Unzipping in Python
Today's post is short and visual. You probably used Python's zip() before. (But if you haven't, you'll figure out what it does in this article, so don't worry!)
End-of-Year Reflections
Let me spare you all my Python-related stuff—the courses, articles, updates here on The Stack, and all that. Instead, my news for 2025 was my return to an old interest: track and field athletics. I even started a new Substack to document my adventures in track and field:
And I’ve written some posts with a track-and-field theme, too. Here’s one of these:
The Properties of Python's `property`
There are some English words I aim to avoid when writing about Python. These are perfectly normal words that have a well-known English meaning that can be useful when explaining concepts. But the same words also have a specific meaning in Python.
But the end of the year is also a time for reflecting on one’s life, past and future. Recently, a Python object has done just that:
Looking forward to a great new year in the Python world and here on The Python Coding Stack. Wishing you all a Happy New Year!
Image by iPicture from Pixabay
Join The Club, the exclusive area for paid subscribers for more Python posts, videos, a members’ forum, and more.
For more Python resources, you can also visit Real Python—you may even stumble on one of my own articles or courses there!
Also, are you interested in technical writing? You’d like to make your own writing more narrative, more engaging, more memorable? Have a look at Breaking the Rules.
And you can find out more about me at stephengruppetta.com












![The Misunderstood Hashable Types and Why Dictionaries Are Called Dictionaries • [Club]](https://substackcdn.com/image/fetch/$s_!lf-v!,w_280,h_280,c_fill,f_auto,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F470a3dd0-3aed-438a-9320-0b6d1aab9fa8_840x600.png)
![Are Tuples More Like Lists or Strings? And Why We Don't Really Care • [Club]](https://substackcdn.com/image/fetch/$s_!FbHw!,w_140,h_140,c_fill,f_auto,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd019e417-1f45-4c0c-924d-9fde8950e81c_840x600.png)




![If You Love Queuing, Will You Also Love Priority Queuing? • [Club]](https://substackcdn.com/image/fetch/$s_!JVKj!,w_280,h_280,c_fill,f_auto,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F515cd013-b57e-4e17-85ff-495630761833_840x600.png)




