【发布时间】:2011-03-12 12:47:10
【问题描述】:
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.附加到 urls{hello.com/, hej.com/, ..., hallo.com/} 的索引: hello.com/a hej.com/b ... hallo.com/n
【问题讨论】:
-
奇怪的是,对于“初学者”问题,您仍然可以获得各种答案。我可以打字的事实并不意味着我可以“python”,我真的很喜欢 gnibbler 的回答而不是 for-messy-things。感谢大家的回答 - 让事情变得简单,特别感谢 gnibbler。
-
这不是各种各样的答案。是两个品种。一个使用
range和chr(),另一个使用string中的现成列表,这是很多人不会想到的。
标签: python string list range ascii