Python:如何打印范围 a-z? [英] Python: how to print range a-z?
本文介绍了Python:如何打印范围 a-z?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
1.打印 a-n: a b c d e f g h i j k l m n
1. Print a-n: a b c d e f g h i j k l m n
<强>2.a-n 中的每一秒: a c e g i k m
2. Every second in a-n: a c e g i k m
3.附加到 urls{hello.com/, hej.com/, ..., hallo.com/} 的索引: hello.com/a hej.com/b ... hallo.com/n
3. Append a-n to index of urls{hello.com/, hej.com/, ..., hallo.com/}: hello.com/a hej.com/b ... hallo.com/n
推荐答案
>>> import string
>>> string.ascii_lowercase[:14]
'abcdefghijklmn'
>>> string.ascii_lowercase[:14:2]
'acegikm'
要做网址,你可以使用类似这样的东西
To do the urls, you could use something like this
[i + j for i, j in zip(list_of_urls, string.ascii_lowercase[:14])]
这篇关于Python:如何打印范围 a-z?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文