Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn March of the Animals | Lists
Python Ninja
SectionΒ 6. ChapterΒ 3
ninja.py

ninja.py

bookMarch of the Animals

Swipe to show menu

You can get a list of items in the inventory by writing ninja.inventory.values(). Now, instead of relying on the position on the map, you can iterate through the Ninja's inventory and perform actions on each element in it.

ninja.py

ninja.py

copy
Task

Swipe to start coding

Solution

Explore other courses in Catalog

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 6. ChapterΒ 3
ninja.py

ninja.py

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt