Run
mylist = [21, 5, 8, 52, 21, 87] r_item = 21 #remove the item for all its occurrences while r_item in mylist: mylist.remove(r_item) print(mylist)
Output