I would like to find the corresponding item in a list but the code below seems to find the corresponding item and then moves on item further as shown:
a = [1,2,3,4]
b = [5,6,7,8]
for i in a:
if i == 1:
print b[i]
Which gives me:
6
When I thought it should print:
5
In which case I'm now having to write:
print b[i-1]