> all articles
- Inside Python
Where Does Python Store Names?
Aug 4, 2026We already know that a variable isn't a 'memory cell' that stores a value. Python creates an object, and a name starts referring to it. But that raises a new question: where is the name itself stored?
- Learn Python
The for Loop
Aug 3, 2026In the previous article, we learned about the `while` loop. It is great when we do not know in advance how many times an action needs to be repeated. But very often we already know that we want to iterate over some set of data.
- Learn Python
The while Loop
Aug 3, 2026In the previous article, we learned how to make programs make decisions. But what should we do when an action needs to be performed many times?
- Inside Python
Why Does Python Need a Garbage Collector?
Aug 3, 2026When the last reference disappears, Python knows the object is no longer needed and frees its memory. At first glance, that seems like all we need. But let’s look at a small example.
- Learn Python
Conditional Statements
Jul 20, 2026Until now, our programs always executed in the same way. But often a program needs to make decisions.
- Inside Python
When Is an Object Actually Deleted?
Jul 20, 2026If an object continues to exist after its name is deleted, who decides when it can finally be removed from memory?
- Learn Python
Reading Input and Displaying Output
Jul 12, 2026So far, every program we've written has behaved exactly the same way. But real programs need to interact with their users.
- Inside Python
What Does the `del` Statement Actually Do?
Jul 12, 2026To answer that question, let's revisit one of the very first ideas we learned in this series.
- Learn Python
Numbers and Strings
Jul 3, 2026In the previous article, we learned how to store data in variables. But what kinds of data can Python actually store?
- Inside Python
Why Does Modifying a Copy Sometimes Change the Original?
Jul 3, 2026We're used to thinking of a copy as a completely independent duplicate. The confusion comes from the fact that Python supports more than one kind of copying.
- Learn Python
Variables and Names
Jun 30, 2026Now it's time to understand how Python stores data.
- Inside Python
Why Does `+=` Sometimes Create a New Object and Sometimes Not?
Jun 30, 2026Many people expect `+=` to simply change a variable. But if you inspect the object with `id()`, you'll sometimes discover that it's actually a different object. Why does `+=` create a new object in some cases but not others?
- Inside Python
Why You Shouldn't Use `def func(items=[])`
Jun 27, 2026To understand what's going on, it's enough to recall what we discussed in previous articles. First, variables don't store objects - they only reference them. Second, a list is a mutable object.
- Learn Python
What Does It Mean to "Run Python"?
Jun 27, 2026When people say, 'I write Python', they're usually referring to two different things at once. The first is the 'Python language' itself. The second is 'the program that can execute that code'.
- Inside Python
Identity and Equality in Python
Jun 22, 2026If you ask a beginner what the difference is between is and ==, you'll often hear something like `==` compares values, while `is` compares references.
- Inside Python
Mutable and Immutable Objects in Python
Jun 20, 2026Python divides all objects into two large groups. The first group is called mutable objects. The second is immutable objects.
- Inside Python
Why Numbers Behave Differently from Lists
Jun 17, 2026It almost looks as if Python somehow 'links' variables together. But that's not what's happening.
- Inside Python
Why Does a List Change in Two Variables?
Jun 10, 2026In the previous article, we learned that variables in Python don't store data themselves. Instead, a name simply refers to an object. With numbers, this feels quite intuitive. But as soon as we start working with lists, Python's behavior often surprises people.
- Inside Python
What Really Happens When You Write x = 10
Jun 3, 2026At first glance it sounds obvious. We imagine a variable as a box in memory where you put a value. But Python works a little differently - and understanding that difference explains a lot.