Python:如何打印范围a-z? [英] Python: how to print range a-z?

查看:586
本文介绍了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.将url索引附加到{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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆