i have taken input in two different lists by splitting a line having integers 1 2
for eg 1 2
3 4
so now i have split it and kept it in lists , and want to multiply them like 1*3 +2*4, but when i try to do it , its giving me that it can only multiply integers and not lists !! help here
can't multiply sequence by non-int of type 'list'.. that's the error i am getting – when i do
c=sum(i*j for i, j in zip(a,b))
...
t=raw_input()
d =[]
for j in range(0,int(t)):
c=0
n=raw_input()
s = raw_input()
s1=raw_input()
a=[]
b=[]
a.append( [int(i) for i in s.split(' ')])
b.append([int(i) for i in s.split(' ')])
d.append(sum(i*j for i, j in zip(a,b)))
for i in d:
print i
that's my code