0 XP
Chapter 4

Lists

Store collections — enemies, items, bullets, scores.

Core Concept

A list holds multiple values in order, like an inventory or enemy roster.

Theory

Create a list with square brackets: inventory = ["sword", "potion", "shield"] scores = [100, 250, 80, 330] print(inventory[0]) # "sword" (index starts at 0) inventory.append("bow") # add item inventory.remove("potion") # remove item print(len(inventory)) # how many items

Live Demo — Run & Explore

Try it live
Loading...

Output will appear here…

Exercise 1 / 1

📝 Create a list of 3 power-ups. Loop through them and print each one.

Your solution
Loading...

Output will appear here…

Functions
If / Else Decisions