I have the data in two lists.
list1 = [1,2,3,4,5]
list2 = [6,7,8,9,10]
So I use a nested for loop:
for a in list1:
for b in list2:
distance = a - b
print distance
This returns:
-5
-6
-7
..
..
..
-4
-5
I would like to have the output as tabular format:
-5 -6 -7 -8 -9
-4 -5 -6 -7 -8
...
...
-1 -2 -3 -4 -5