Answers for "how to remove element from a list in python"

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

Code answers related to "how to remove element from a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language