how to use lambda function with list in python code example
Example 1: map function using lambda in python
# Map function
nums1 = [2,3,5,6,76,4,3,2]
sq = list(map(lambda a : a*a, nums1))
print(sq)
Example 2: python3 lambda
>>> sum = lambda x, y : x + y
>>> sum(3,4)
7