CodeAgeBy Sitezack
Final project: your text RPGYour choose-your-own adventure0 XP
Chapter progress0/6

Lesson 2 of 6

Your adventurer's bag

The inventory is a list: inventory = ["potion"]. You add an item with append, remove one with remove.

len(inventory) tells you how many items you carry — handy before entering a dungeon.

inventory = ["potion"]
inventory.append("map")
print(len(inventory))

🎯 Your mission

Your bag holds inventory = ["potion"]. Add exactly the word "elixir" with append, store the number of items in count, then print count.

PRO lesson

This advanced chapter is part of CodeAge PRO. Unlock it to keep your adventure going.

Discover PRO