1nums = [1, 2, 3, 4, 5]
2
3
4print(list(map(lambda n:n*n, nums)))
5#lambda n : n in this case is the passed value
1>>> full_name = lambda first, last: f'Full name: {first.title()} {last.title()}'
2>>> full_name('guido', 'van rossum')
3'Full name: Guido Van Rossum'
4
1>>> def make_incrementor(n):
2... return lambda x: x + n
3...
4>>> f = make_incrementor(42)
5>>> f(0)
642
7>>> f(1)
843
9