Articles
The problem...
You have a list. But it's not final.
You need to add something. Remove something. Sort it. Flip it around.
Lists in Python aren't frozen — you can change t…
The problem...
You have a list. But you don't always know what's in it.
Is a specific value there? Where exactly is it? How many times does it appear? How long is the list?
You…
The problem...
You have a list. Ten elements. A hundred. Maybe more.
You don't want to write print(squad[0]), print(squad[1]), print(squad[2])...
You want to do something with …
The problem...
You have three squads. Each squad has its own list of members.
You could create three separate lists:
alpha = ["Raven", "Wolf", "Ghost"]
bravo = ["Viper", "Bull…
What you're building
A shopping list manager that runs in a loop.
The user can add items, remove items, and quit when done.
The list updates and prints after every action.
Wha…
What you're building
A grade book for three subjects: Math, English, Biology.
The user adds grades for each subject. The program calculates and displays the average per subject …