Articles
The idea!
You've covered def, parameters, default parameters, return, scope, multiple return values, try/except, and raise.
This is your reference. Everything in one place.
Com…
You did it.
And this one is different.
Basics gave you the building blocks. Control Flow taught your code to think and repeat. But Functions — Functions changed something …
The problem...
You have five soldiers. Each one has a name.
You could store them like this:
soldier1 = "Raven"
soldier2 = "Wolf"
soldier3 = "Ghost"
soldier4 = "Viper"
soldi…
The problem...
You know what a list is. One variable, multiple values.
But knowing the concept isn't the same as knowing how to build one.
There are several ways to create a li…
The problem...
You have a string. One long piece of text.
But the data inside it isn't one thing — it's many things stuck together.
line = "Raven Wolf Ghost Viper Bull"
…
The problem...
You have a list. Five names, ten scores, a hundred values.
But you don't always need the whole thing.
You need one element. Or a few. Or everything from position…