python同时遍历两个list
list1 = ['a', 'b', 'c', 'd']
list2 = ['apple', 'boy', 'cat', 'dog']
for x, y in zip(list1, list2):
print(x, y)
注:两个列表等长
python同时遍历两个list
list1 = ['a', 'b', 'c', 'd']
list2 = ['apple', 'boy', 'cat', 'dog']
for x, y in zip(list1, list2):
print(x, y)
注:两个列表等长