Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Removing item by value | Lists
Ninja de Python
course content

Contenido del Curso

Ninja de Python

Ninja de Python

1. Controles Básicos
2. Controles Avanzados
3. Funciones
4. Bucles
5. Sentencias If-Else
6. Desafíos
7. Lists

book
Removing item by value

Previously, we removed items from the inventory by index, but it’s also possible to remove items from the inventory by value.

The inventory can contain objects like cat, dog, monkey, chicken, parrot, etc. So, if you want to remove dog from the inventory, you can simply write ninja.inventory.remove("dog").

Tarea

Swipe to start coding

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 7. Capítulo 5
py

ninja.py

toggle bottom row

book
Removing item by value

Previously, we removed items from the inventory by index, but it’s also possible to remove items from the inventory by value.

The inventory can contain objects like cat, dog, monkey, chicken, parrot, etc. So, if you want to remove dog from the inventory, you can simply write ninja.inventory.remove("dog").

Tarea

Swipe to start coding

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 7. Capítulo 5
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Lamentamos que algo salió mal. ¿Qué pasó?
some-alt