delete items in a list from a certain element code example
Example 1: python list remove item by value
l = ['Alice', 'Bob', 'Charlie', 'Bob', 'Dave']
print(l)
# ['Alice', 'Bob', 'Charlie', 'Bob', 'Dave']
l.remove('Alice')
print(l)
# ['Bob', 'Charlie', 'Bob', 'Dave']
Example 2: python remove by index
a = [0, 1, 2, 3, 4, 5]
el = a.pop(2)