How to remove an item from a list in Python

In this short tutorial, you will learn how to remove an item from a list in Python using remove and the del keyword. Want to learn more? See our courses here

Read the documentation for lists here:

Code from video:
company = [‘michael’, ‘eric’, ‘michael’]
del company[-1]

Connect with us!


Xem thêm bài viết khác:


  1. 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

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

  3. 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. 😀 Thanks 😉

Leave a Reply

Your email address will not be published. Required fields are marked *