0

Lambdas return map/list

how to return a list or map by using lambdas..?

11th Feb 2017, 1:55 PM
Narayana
Narayana - avatar
2 odpowiedzi
0
here's an exemple on using a map on a whole liste: liste=[1,2,3,4,5] liste=list(map(lambda x: x+1,liste) here's an exemple on returning a whole listed using lambda : liste=[1,2,3,4,5] print((lambda x:x)(liste))
11th Feb 2017, 10:57 PM
ramzi
ramzi - avatar
- 1
thislist = [5,3,8,7,2] thisismap = map(lambda y: y*y, thislist) print(thisismap)
7th Jun 2017, 6:17 PM
Shashank Kumar Mandaloju
Shashank Kumar Mandaloju - avatar