0
a = [1, 2, 3, 4, 5]
b = [9, 8, 7, 6, 5]

Desired output

False
False
False
False
True
ywbaek
  • 2,971
  • 3
  • 9
  • 28
Jernkal
  • 13
  • 1

1 Answers1

1
a = [1, 2, 3, 4, 5]
b = [9, 8, 7, 6, 5]

for first, second in zip(a, b):
    print(first == second)

Keep in mind this is assuming a and b are the same length. Otherwise it will only iterate over the shorter of both lists.

raccoons
  • 420
  • 3
  • 16
  • Thank you! Worked perfectly! I’ve never used zip. I’m super appreciative of the answer and glad to look into it for future reference as well. – Jernkal Jul 09 '20 at 12:49