In python, how can I remove all occurrences of an integer from a list. For example:
list_a = [5, 20, 15, 10, 55, 30, 65]
list_a.METHOD(5)
print(list_a)
[20, 10, 30]
Essentially, the method removes anything that contains a 5. Not specifically multiples of 5, given that 10 and 20 do not contain a 5. Thanks.