Answers for "how to use lambda function with list in python"

8

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)
Posted by: Guest on August-07-2020
1

python3 lambda

>>> sum = lambda x, y : x + y
>>> sum(3,4)
7
Posted by: Guest on April-04-2020

Code answers related to "how to use lambda function with list in python"

Python Answers by Framework

Browse Popular Code Answers by Language