a = [1,2]
b = ["cat", "dog"]
ab = zip(a, b)
for element in ab:
print(element)
(1, 'cat')
(2, 'dog')
but, I committed an error and wrote this:
for element in ab:
print(ab)
then I wrote:
for element in ab:
print(element)
that did not print any output, so my question is, basically, why?