标签:list zip for class int app cat python 列表
python同时遍历两个list
list1 = [‘a‘, ‘b‘, ‘c‘, ‘d‘]
list2 = [‘apple‘, ‘boy‘, ‘cat‘, ‘dog‘]
for x, y in zip(list1, list2):
print(x, y)
注:两个列表等长
标签:list zip for class int app cat python 列表
原文地址:https://www.cnblogs.com/Sakurar/p/12723903.html