def pop_x(arr, x): return list(filter(lambda i: i != x, arr)) # Removes all int values(x) from list(arr), in python 3.