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 15:59:49 CEST 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