Note It seems good to use zip as below
python
a = [1, 3, 5, 7]
b = [2, 4, 6]
for (a_num, b_num) in zip(a, b):
print(a_num, b_num)
#The result is as follows
# 1 2
# 3 4
# 5 6
When the processing with the shorter length is completed, it seems that the processing will end there
Recommended Posts