Module 5

remove()

Removing items from a list.

Removing items

The remove() method removes the first occurrence of a value. The pop() method removes an item by index.

Python
samples = ["control", "treatment", "blank"]
samples.remove("blank")
print(samples)
['control', 'treatment']
Your task

Remove from a list

  • Remove 'blank' from the list.