(Mar-11-2018, 09:17 PM)mepyyeti Wrote: no. I mean lambda as inactually, it's the
map
that is alternative to list comprehension
.i.e. without map you will not get iterator as result. you can substitute lambda with ordinary function, yet you cannot skip map if you want iterator as result
def increase_10(num): return num + 10 bar = [1,2,3] foo = list(map(increase_10, bar)) print(foo) # and with list comprehension foo = [n+10 for n in bar] foo = [increase_10(n) for n in bar]