22问答网
所有问题
Python中for循环两个列表要怎么使用
如题所述
举报该问题
推荐答案 2018-03-29
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
或者
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://22.wendadaohang.com/zd/fhCX0XfIC0hfCC22TIS.html
相似回答
大家正在搜
相关问题
python怎么循环两个列表
python中如何同时循环两个列表
有关python中for循环和列表的两个问题!!
python中两个for循环的问题
python中使用for循环遍历列表,出现多遍历一次为什么
python 使用嵌套的for循环创建二维列表?
在python中如何将两个list合并成一个list,不用f...
python如何同时进行两个循环?