Generate alphabet?

Medardo Rodriguez (Merchise Group) med.swl at gmail.com
Fri Aug 22 18:23:22 EDT 2008


On Fri, Aug 22, 2008 at 6:02 PM, ssecorp <circularfunc at gmail.com> wrote:
> .['a'..'z'] for a list of the alphabet.
>
> Is there a way in Python to generate chars?


Not as nice as in Haskell (or other languages), but:

[chr(i) for i in xrange(ord('a'), ord('z')+1)]

Regards



More information about the Python-list mailing list