Pythonは2つのリストを同時にトラバースします
list1 = ['a'、 'b'、 'c'、 'd']
list2 = ['apple'、 'boy'、 'cat'、 'dog']
for x、y in zip(list1、list2):
print(x、y)
注:2つのリストは同じ長さです
Pythonは2つのリストを同時にトラバースします
list1 = ['a'、 'b'、 'c'、 'd']
list2 = ['apple'、 'boy'、 'cat'、 'dog']
for x、y in zip(list1、list2):
print(x、y)
注:2つのリストは同じ長さです