drop a item from a list python code example
Example 1: remove element from list
>>> a = [0, 2, 3, 2]
>>> a.remove(2)
>>> a
[0, 3, 2]
Example 2: delete something from list python
import random
#Let's say that we have a list of names.
listnames = ['Miguel', 'James', 'Kolten']
#Now, I choose a random one to remove.
removing = random.choice(listnames)
#And to delete, I do this:
listnames.remove(remove)