I am wondering how I would delete all items specified from a list, including all duplicates.
Here is a dumbed down version of my code, and it's only deleting half of the list each time. Wondering mostly why it doesn't delete all items at first.
blacklist = ['127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1', '127.0.0.1']
item = '127.0.0.1'
print(blacklist)
for _ in blacklist:
blacklist.remove(item)
print(blacklist)