Skip to main content

Program to demonstrate lambda functions using filter() and map() function

· One min read
Kaustubh Kulkarni

Que > Program to demonstrate lambda functions using filter() and map() function

file.py
tup= (5, 7, 22, 97, 54, 62, 77, 23, 73, 61)
print(tuple(map(lambda x: x+1 , tup)))
y = filter(lambda x: (x>=10), tup)
print(list(y))
Output
(6, 8, 23, 98, 55, 63, 78, 24, 74, 62)
[22, 97, 54, 62, 77, 23, 73, 61]