If you want to remove all occurrences of value from a list then you can follow the following methods:-
If you are a Python 2.x user then you can use the filter() function to do your task:-
>>> x = [1,2,3,2,2,2,3,4]
>>> filter(lambda a: a != 2, x)
If you are a Python 3.x user then you can use the list(filter()) or lambda function to do your task:-
>>> x = [1,2,3,2,2,2,3,4]
>>> list(filter((2).__ne__, x))
OR
>>> x = [1,2,3,2,2,2,3,4]
>>> list(filter(lambda a: a != 2, x))