Зміст курсу
Python Ninja
Python Ninja
1. Основні Елементи Управління
Removing item by index
You can access the ninja's inventory by writing ninja.inventory
, and operate on it using various methods.
For example, if you want to remove an item from your inventory, you can use the pop(index)
method. This will delete and return the item at the specified index
, or the last item if index
is omitted.
Завдання
Swipe to start coding
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 7. Розділ 4
ninja.py
Removing item by index
You can access the ninja's inventory by writing ninja.inventory
, and operate on it using various methods.
For example, if you want to remove an item from your inventory, you can use the pop(index)
method. This will delete and return the item at the specified index
, or the last item if index
is omitted.
Завдання
Swipe to start coding
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 7. Розділ 4