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

2007-04-09 Thread Michael Bentley
On Apr 9, 2007, at 6:30 AM, Duncan Booth wrote: Michael Bentley <[EMAIL PROTECTED]> wrote: On Apr 9, 2007, at 3:29 AM, 人言落日是天涯,望极天涯不 见家 wrote: Is there a simple function to generate a list like ['a', 'b', 'c', ... '

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

2007-04-09 Thread skip
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 -- http://mail.python.org/mailman/listinfo/python-list

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

2007-04-09 Thread Steven D'Aprano
On Mon, 09 Apr 2007 01:43:11 -0700, 7stud wrote: >> Is there a simple function to generate a list like ['a', 'b', 'c', ... >> 'z']?   The range() just can generate the numeric list. > > Not very simple, but how about a list comp

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

2007-04-09 Thread Duncan Booth
Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 9, 2007, at 3:29 AM, 人言落日是天涯,望极天涯不 > 见家 wrote: > >> Is there a simple function to generate a list like ['a', 'b', 'c', ... >> 'z']? The ra

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

2007-04-09 Thread [EMAIL PROTECTED]
map(chr,range(65,91)) /Martin -- http://mail.python.org/mailman/listinfo/python-list

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

2007-04-09 Thread 人言落日是天涯,望极天涯不见家
On Apr 9, 4:39 pm, Thomas Krüger <[EMAIL PROTECTED]> wrote: > 人言落日是天涯,望极天涯不见家 schrieb: > > > Is there a simple function to generate a list like ['a', 'b', 'c', ... > > 'z']?   The range() just can generate the numeric list. > >

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

2007-04-09 Thread 7stud
On Apr 9, 2:29 am, "人言落日是天涯,望极天涯不见家" <[EMAIL PROTECTED]> wrote: > Is there a simple function to generate a list like ['a', 'b', 'c', ... > 'z']?   The range() just can generate the numeric list. Not very simple, but how about

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

2007-04-09 Thread 人言落日是天涯,望极天涯不见家
On Apr 9, 4:35 pm, Michael Bentley <[EMAIL PROTECTED]> wrote: > On Apr 9, 2007, at 3:29 AM, 人言落日是天涯,望极天涯不 > > 见家 wrote: > > Is there a simple function to generate a list like ['a', 'b', 'c', ... > > 'z']?   The range() just can g

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

2007-04-09 Thread Thomas Krüger
人言落日是天涯,望极天涯不见家 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 -- http://mail.python.org/mailman/listinfo/python-list

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

2007-04-09 Thread Michael Bentley
On Apr 9, 2007, at 3:29 AM, 人言落日是天涯,望极天涯不 见家 wrote: > Is there a simple function to generate a list like ['a', 'b', 'c', ... > 'z']? The range() just can generate the numeric list. import string list(string.lowercase) -- http://mail.python.org/mailman/listinfo/python-list

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

2007-04-09 Thread 人言落日是天涯,望极天涯不见家
Is there a simple function to generate a list like ['a', 'b', 'c', ... 'z']? The range() just can generate the numeric list. -- http://mail.python.org/mailman/listinfo/python-list