To remove the first occurrence of an element by value in a list, you can simply use list.remove():-
x = ['a', 'b', 'c', 'd', ‘b’]
x.remove('b')
print (x )
To remove all the occurrences of an element in a list you can use a list comprehension:-
y = [10, 20, 30, 40, 20, 30, 40, 20, 70, 20]
y = [i for i in y if i != 20]
print (y)