1

Suppose I have two lists a= [1,2,3 ..] and b= [3,2,1 ..] I would like to compare the corresponding elements in both list's, what do i mean by this is : comparing a[0] and b[0], a[1] and b[1] and so on.

I have written below code, but it compares each element in list 'a' with all the elements in list 'b'. Thank you in advance

for i,o in enumerate(a):
    for j,k in enumerate(b):
        if (a[i] > b[j]):
           (do something)
mhlester
  • 22,781
  • 10
  • 52
  • 75

0 Answers0