例2.24 zip()函数使用示例
点击查看代码
s1=[str(x)+str(y) for x,y in zip(['v']*4,range(1,5))]
s2=list(zip('abcd',range(4)))
print(s1); print(s2)
print("学号:2023310143004")
s1=[str(x)+str(y) for x,y in zip(['v']*4,range(1,5))]
s2=list(zip('abcd',range(4)))
print(s1); print(s2)
print("学号:2023310143004")