You can try list comprehension to delete all occurrences of an element from a Python list.
Here is an example:
>>> aa=[10,11,12,10,23,34,10,56]>>> a=[v for v in aa if v!= 10]>>> a[11, 12, 23, 34, 56]
>>> aa=[10,11,12,10,23,34,10,56]
>>> a=[v for v in aa if v!= 10]
>>> a
[11, 12, 23, 34, 56]