Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # inventory.py
- stuff = {"coal":42,"dagger":1,"iron":20,"torch":2}
- total_items = 0
- def display_inventory(inventory):
- for k,v in inventory.items():
- print(k,v)
- global total_items
- total_items = total_items + v
- print("n")
- print("Total: " + str(total_items))
Add Comment
Please, Sign In to add comment