names = ['Boris', 'Steve', 'Phil', 'Archie'] names.pop(0) #removes Boris names.remove('Steve') #removes Steve
a = [10, 20, 30, 20] a.remove(20) # a = [10, 30, 20] # removed first instance of argument
# animals list animals = ['cat', 'dog', 'rabbit', 'guinea pig'] # 'rabbit' is removed animals.remove('rabbit') # Updated animals List print('Updated animals list: ', animals)
list.remove(element)