names = ['Boris', 'Steve', 'Phil', 'Archie'] names.pop(0) #removes Boris names.remove('Steve') #removes Steve
# delete by index a = ['a', 'b', 'c', 'd'] a.pop(0) print(a) ['b', 'c', 'd']
a = [10, 20, 30, 20] a.remove(20) # a = [10, 30, 20] # removed first instance of argument
list.remove(element)
l = list(range(10)) print(l) # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] l.clear() print(l) # []