Pythonfor循环中的zip
s = ["1", "2", "3", "4", "5"]
t = ["a", "b", "c", "d", "e"]
for x, y in zip(s, t):
print(x+"-"+y)
120dj
绿叶对根的情意歌词print(">#")
u = {"1", "2", "3", "4", "5"}
郭美美mv
v = {"a", "b", "c", "d", "e"}
for x, y in zip(u, v):
print(x+"-"+y)
输出:
宝贝对不起草蜢
1-a
央视女主播家产案2-b
3-c
4-d
5-e
>#
爱情没有对与错1-e
2-c
4-d
5-a
3-b