Iterate two list with the same number of elements at once
I am trying to figure out how to make those 2 for loops in just one. I tried to put together both for loops, but the output is a tuple, so it doesn`t work for me. And I am stucked in tryong to build a function: for i in first: if len(i) > 4: print("Error: Numbers cannot be more than four digits.") elif i.isalpha(): print("Error: Numbers must only contain digits.") else: if len(i) > maxlenf: maxlenf = len(i) for i in second: maxlens=0 if len(i) > 4: print("Error: Numbers cannot be more than four digits.") elif i.isalpha(): print("Error: Numbers must only contain digits.") else: if len(i) > maxlens: maxlens = len(i) Somebody can help, please.