i have two list, a multidimensional list and a single list
cf = [[2000, 4000, 6000, 8000], [2000, 4000, 6000, 8000], [2000, 4000, 6000, 800]]
tev = [6000.0, 4800.0, 3480.0]
i want to dynamically subtract the value of the first element of the 2d list(cf[0]) from the value of the first element of tev[0]
which would be
2000 - 6000
4000 - 6000
6000 - 6000
8000 - 6000
and also do the same for the next element of both list
how do i go about that thanks
What I have tried:
i tried the following code but its not working
cf = [[2000, 4000, 6000, 8000], [2000, 4000, 6000, 8000], [2000, 4000, 6000, 800]]
tev = [6000.0, 4800.0, 3480.0]
for i in cf:
for u in i:
print [u * j for j in tev]