2020-08-14

Python - List removal of a given value as many times as it appears

l = [1,2,3,4,5,1,1,1,2]

print(list(filter(lambda x: x!=1, l)))


No comments:

Post a Comment