作者热门文章
- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
1.打印 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
3.将 a-n 附加到 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'
要做网址,你可以使用类似这样的东西
[i + j for i, j in zip(list_of_urls, string.ascii_lowercase[:14])]
关于Python:如何打印范围 a-z?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3190122/
我是一名优秀的程序员,十分优秀!