Python中for循环两个列表要怎么使用

如题所述

for x, y in zip(a, b):
print(f'x={x}, y={y}')

# x=1, y=4

# x=2, y=5

# x=3, y=6

或者


温馨提示:答案为网友推荐,仅供参考
相似回答