gpt4 book ai didi

python - 如何打印列表索引

转载 作者:太空宇宙 更新时间:2023-11-04 10:25:17 25 4
gpt4 key购买 nike

<分区>

key = ['q','w','e','r','t','y','u','i','o','p']
alp = ['a','b','c','d','e','f','g','h','i','j']

在这种情况下,如何打印这样

qa, wb, ec, rd, te .....等...

我只是想

 for k in key:
for a in alp:
print(str(k) + str(a))

但这当然是错误的。它只打印 qa qb qc qd .... wa wb wc wd .... 等等

所以我试过了

for k in key[d]:
for a in alp[d]:
print(str(k) + str(a))
d = d+1

但它只给我一个

qa

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com