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

skip at pobox.com skip at pobox.com
Mon Apr 9 09:59:49 EDT 2007


    Thomas> [ chr(i) for i in range(97, 123) ]

Or with fewer magic numbers:

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

Skip



More information about the Python-list mailing list