How can I ignore ValueError when I try to remove an element from a list?
How can I ignore ValueError when I try to remove an element from a list? Question: How can I ignore the “not in list” error message if I call a.remove(x) when x is not present in list a? This is my situation: >>> a = range(10) >>> a [0, 1, 2, 3, 4, 5, 6, …
Total answers: 8