2019-01-24
阅读量:
727
好用的zip函数
这个函数返回一个含元组的列表,
代码如下:
l1 = ('You gotta', 'the')
l2 = ('love', 'built-in')
out = []
if len(l1) == len(l2):
for i in range(len(l1)):
out.append((l1[i], l2[i]))
# out = [('You gotta', 'love'), ('the', 'built-in)]






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
3条评论