How can I ignore the \"not in list\" error message if I call a.remove(x) when x is not present in list a?
a.remove(x)
x
a
This is my situation:
How about list comprehension?
a = [x for x in a if x != 10]