Python - Remove List Items

Publicado el: 03 julio 2024
en el canal de: Developers Vision
6
0

Remove Specified Item

The remove() method removes the first matching element (which is passed as an argument) from the list.

create a list
prime_numbers = [2, 3, 5, 7, 9, 11]

remove 9 from the list
prime_numbers.remove(9)

Updated prime_numbers List
print('Updated List: ', prime_numbers)

Output: Updated List: [2, 3, 5, 7, 11]


En esta página del sitio puede ver el video en línea Python - Remove List Items de Duración hora minuto segunda en buena calidad , que subió el usuario Developers Vision 03 julio 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 6 veces y le gustó 0 a los espectadores. Disfruta viendo!