Answers for "Lambda Functions using for loop"

0

lambda functions using for loop

list1 = [1,2,3,4,5]

list2 = []

for i in list1:

    f = lambda i: i /2

    list2.append(f(i))
print(list2)
Posted by: Guest on July-13-2021
0

Lambda Functions using for loop

list1 = [1,2,3,4,5]
list2 = []

for i in list1:
    f = lambda i: i /2
    list2.append(f(i))
print(list2)
Posted by: Guest on July-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language