python array find lambda

Solutions on MaxInterview for python array find lambda by the best coders in the world

showing results for - "python array find lambda"
Flora
08 Jan 2020
1lst = [1,2,3,4]
2filter(lambda x: x % 2 == 0, lst)
3[x for x in lst if x %2 == 0]
4#[2,4]
5