how to multiply two arrays in python

Solutions on MaxInterview for how to multiply two arrays in python by the best coders in the world

showing results for - "how to multiply two arrays in python"
Aaliyah
01 Nov 2016
1list1 = [1, 2, 3]
2list2 = [4, 5, 6]
3products = []
4
5for num1, num2 in zip(list1, list2):
6	products.append(num1 * num2)
7
8print(products)
9
10OUTPUT
11[4, 10, 18]