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', ...
'
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
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
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
map(chr,range(65,91))
/Martin
--
http://mail.python.org/mailman/listinfo/python-list
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.
>
>
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
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
人言落日是天涯,望极天涯不见家 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
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']? The range() just can generate the numeric list.
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo