编程语言
首页 > 编程语言> > Python for循环定义三个变量——zip

Python for循环定义三个变量——zip

作者:互联网

start_lists = [1, 10, 20, 40]
end_lists = [9, 19, 29, 49]
lables = ['个位数', '十位数', '二十位数', '三十位数']
for (start, end, lable) in zip(start_lists, end_lists, lables):
    print(start, end, lable)

1 9 个位数
10 19 十位数
20 29 二十位数
40 49 三十位数

标签:end,变量,zip,Python,lists,20,start,十位数
来源: https://blog.csdn.net/weixin_53138343/article/details/119253508