在python 3x中使用For语句

时间:2014-08-06 02:50:50

标签: python-3.x

我需要编写一个for语句来将小写字母的每个字符绑定到名称" c" (无需编写循环体)。我知道当你想重复循环时会使用它们,但我只是在这个问题上消隐,因为我没有看到它们是如何组合在一起的,有人可以帮助一个不起作用。感谢

1 个答案:

答案 0 :(得分:0)

from string import ascii_lowercase
for character in ascii_lowercase:
    c = character