multiply two list in python using lambda

Solutions on MaxInterview for multiply two list in python using lambda by the best coders in the world

showing results for - "multiply two list in python using lambda"
Alison
04 Jan 2017
1# element-wise multiplication of x & y
2>>>x = [1,2,3,4]
3>>>y = [2,3,4,5]
4>>>[a*b for a,b in zip(x,y)]
5[2, 6, 12, 20]
Lyam
29 Oct 2018
1list1 = [1, 2, 3, 4, 5]
2list2 = [6, 5, 4, 3, 3]
3
4Result = []
5for i1, i2 in zip(list1, list2):
6  Result.append(i1*i2)
queries leading to this page
single line code for appeding mutipling 2 of elements in another listcan i multiply an append method in pythonelement wise multiplication in python for matrixpython element by element multiplicationc 23 multiply each value in list with each otherpython 2a 3d element wise multiplicationmultiplication of elements in array pythonpython element wise multiplication listmultiply list of numbers python list comprehensionelement by element multiplication python listmultiply two elements of a list pythonelement multiplication in list pythonelement wise multiplication of three listspythonmultiply two number in appendcompute the pairwise dot product of elements present in two lists multiply two list in python using lambdamultiply list by 2 pythonelement wise multiplication pythonwrite a function for adding a list of numbers and multiply by a constantspython multiply listspython element wise multiplicationmultiply element wise list pythonmultiply every number lists by number in other list pythonhow do you multiply integers and floats in a list in python 3fpython multiply array elementshow multiply list by list pythonhow to multiply two lists in celement wise matrix multiplication pythonappend multiply value in listelement by element multiplication pythonlisthow to create a list with element as product of corresponding elements of two listsmultiply whole nparray pythonmultiplying with lists pythonpython 2 7 elementwise multiplicationmultiply two lists pythonmultiply list with scalar pythonpython multiply two listsmultiply elemenwise list pythonelement wise multiplication of multiple listspythonnumpy element wise multiplication for two list python times list by a listelement wise multiplication in python using 40elementwise multiplication list pythonmutliply into list in pythonhow to do element wise multiplication in pythonpython multiplication element wise how to multiply two lists in c programmingelement wise multiplication list pythonlist element wise multiplication pythonelement wise multiplication in pythonnumpy multiply 2 listselement wise multiplication pythonlist elementwise multiplicationmultiply python listhow to multiply lists togethermultiply two list in python using lambda