Answers for "python del from list"

12

python how to remove item from list

list.remove(item)
Posted by: Guest on April-12-2020
3

remove in list python

# animals list
animals = ['cat', 'dog', 'rabbit', 'guinea pig']

# 'rabbit' is removed
animals.remove('rabbit')

# Updated animals List
print('Updated animals list: ', animals)
Posted by: Guest on May-01-2020
0

delete item from list

listname.remove(element)
Posted by: Guest on October-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language