Is there a simple function to generate a list like ['a', 'b', 'c', ... 'z']?

Thomas Krüger newsgroups at nospam.nowire.org
Mon Apr 9 04:39:20 EDT 2007


人言落日是天涯,望极天涯不见家 schrieb:
> Is there a simple function to generate a list like ['a', 'b', 'c', ...
> 'z']?   The range() just can generate the numeric list.

There is:
[ chr(i) for i in range(97, 123) ]

Thomas



More information about the Python-list mailing list