0

How to get a list which contains the subtracted values of two lists

If list1=[1,2,3] and list2=[1,1,1] result =[0,1,2] Here 'result' is the final list which contains the subtracted values of list1 and list2

11th Aug 2019, 7:16 PM
Abdullah rafi
Abdullah rafi - avatar
2 Réponses
+ 1
import numpy list1=numpy.array([1,2,3]) list2=numpy.array([1,1,1]) result=list1-list2
25th Aug 2019, 12:10 AM
sayan chandra
sayan chandra - avatar
0
Thank you Ace
14th Aug 2019, 9:52 AM
Abdullah rafi
Abdullah rafi - avatar