python remove element from list by name code example
Example 1: delete a value in list python
list.remove(element)
Example 2: 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 3: how to remove a element from list in python and print it
pop(n) removes the element at the given index number and can print it