a = [1, 2, 3, 4, 5]
b = [9, 8, 7, 6, 5]
Desired output
False
False
False
False
True
a = [1, 2, 3, 4, 5]
b = [9, 8, 7, 6, 5]
Desired output
False
False
False
False
True
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.