How to remove an item from a list in Python

preview_player
Показать описание


Code from video:
*****************
company = ['michael', 'eric', 'michael']
company
del company[-1]
company

Connect with us!
*****************
Рекомендации по теме
Комментарии
Автор

very useful, I had to answer a question in my coding class for homework and I didn't know what to say so I looked it up on google and found your video so I watched it and it helped me answer the question. :D Thanks ;)

audreywang
Автор

Hi, I wanted to know if it would be alright to ask a question: whenever I use del listname[x], it seems like Python completely bypasses it and keeps the original list. Would you happen to know why this happens? thank you

mehhhhh
Автор

i am making a program to help and teach me my times tables.

hortdog