Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,932 questions

51,869 answers

573 users

How to multiply two lists using numpy array in Python

1 Answer

0 votes
import numpy as np
 
list1 = [1, 2, 3, 4]
list2 = [5, 6, 7, 8]
 
arr1 = np.array(list1)
arr2 = np.array(list2)
 
print(arr1 * arr2)


'''
run:

[ 5 12 21 32]

'''

 



answered Jan 24, 2019 by avibootz

Related questions

1 answer 207 views
3 answers 165 views
165 views asked Apr 18, 2021 by avibootz
3 answers 268 views
268 views asked Apr 18, 2021 by avibootz
1 answer 92 views
1 answer 126 views
126 views asked Feb 27, 2019 by avibootz
...