Answer the question
In order to leave comments, you need to log in
Passage at once on two lists?
Is there any way to loop through two lists at once?
By type: (this will not work). for i, j in digits, symbols
Answer the question
In order to leave comments, you need to log in
There is a built-in function for this zip
[ ? ].
for digit, symbol in zip(digits, symbols):
pass
zip will truncate a list that is longer.
Why not make it explicit?
for i in range(max(len(digits), len(symbols))):
try:
print(digits[i], symblos[i])
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question