Answers for "multiply two list in python using lambda"

1

python element wise multiplication list

# element-wise multiplication of x & y
>>>x = [1,2,3,4]
>>>y = [2,3,4,5]
>>>[a*b for a,b in zip(x,y)]
[2, 6, 12, 20]
Posted by: Guest on June-05-2020
0

multiply two list in python using lambda

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

Result = []
for i1, i2 in zip(list1, list2):
  Result.append(i1*i2)
Posted by: Guest on September-11-2021

Code answers related to "multiply two list in python using lambda"

Python Answers by Framework

Browse Popular Code Answers by Language