Articles
You've covered lists from every angle. Before moving on, here's everything in one place.
// Creating lists
["a", "b", "c"] # literal — values known upfront
[] …
A list is just a list. Until you know what to do with it.
append() until it's full. pop() when you're done with something. sort() when order matters. copy() before you break the …
The problem...
You have a list of soldiers and a list of scores.
names = ["Raven", "Wolf", "Ghost"]
scores = [85, 74, 91]
To find Wolf's score, you need to know Wolf is at in…
The problem...
You know what a dict is. Key, value, instant lookup.
But there's more than one way to build one — and each fits a different situation.
Knowing which to rea…
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 …
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…