lst = ['a', 'b', 'c'] filter_list = list(filter(lambda s: s in ('a', 'b'), lst)) print(filter_list) # ['a', 'b']
Recommended Posts