// blog

Articles

// Data Structures
How to Ask a Dict for What You Need

The problem...
You have a dict. Data is in there — names, scores, settings, whatever it is.
Now you need to get it out.
There's more than one way to do it. And the wrong …

06 May 2026 2 min read files [1] comments [0] 18 views
// Data Structures
How to Modify a Dict

The problem...
You have a dict. But data changes.
A soldier gets promoted. A score gets updated. An entry needs to be removed.
Dicts in Python aren't frozen — you can cha…

06 May 2026 2 min read files [1] comments [0] 18 views
// Data Structures
Getting Information From a Dict

The problem...
You have a dict. But you don't always know what's in it.
Is a specific key there? How many entries does it have? What are all the keys?
You need tools to look in…

06 May 2026 2 min read files [1] comments [0] 18 views
// Data Structures
Going Through Every Key and Value

The problem...
You have a dict with ten entries. Twenty. A hundred.
You need to do something with every key, every value, or every pair.
Writing it out manually isn't an option…

06 May 2026 2 min read files [1] comments [0] 18 views
// Data Structures
Nested Dicts: One Structure, All the Data

The problem...
You have three soldiers. Each one has a name, a score, and a status.
You could store them as three separate dicts:
raven = {"score": 85, "active": True}
wolf =…

06 May 2026 2 min read files [1] comments [0] 18 views
// Data Structures
Dict Mini Project — Tip Calculator

What you're building
A tip calculator. The user enters the bill amount and rates the service. The program looks up the tip percentage from a dict and calculates how much to leave…

06 May 2026 1 min read files [1] comments [0] 18 views