Re: Character Sequence Generation

2005-09-23 Thread Peter Otten
Jeff Schwab wrote: What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . import re def char_set(a_z, all_chars=.join(map(chr, range(256: ... return re.compile([%s] % a_z).findall(all_chars) ... for c in

Re: Character Sequence Generation

2005-09-23 Thread Jeff Schwab
Pedro Werneck wrote: On Thu, 22 Sep 2005 23:26:58 -0400 Jeff Schwab [EMAIL PROTECTED] wrote: What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . If you want arbitrary sequences, you may use something like:

Character Sequence Generation

2005-09-22 Thread Jeff Schwab
What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . -- http://mail.python.org/mailman/listinfo/python-list

Re: Character Sequence Generation

2005-09-22 Thread [EMAIL PROTECTED]
Jeff Schwab wrote: What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . import string print string.ascii_lowercase abcdefghijklmnopqrstuvwxyz Others: ascii_letters =

Re: Character Sequence Generation

2005-09-22 Thread Jeff Schwab
[EMAIL PROTECTED] wrote: Jeff Schwab wrote: What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . import string print string.ascii_lowercase abcdefghijklmnopqrstuvwxyz Thanks. Is there a good way to generate

Re: Character Sequence Generation

2005-09-22 Thread Pedro Werneck
On Thu, 22 Sep 2005 23:26:58 -0400 Jeff Schwab [EMAIL PROTECTED] wrote: What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . If you want arbitrary sequences, you may use something like: [chr(x) for x in

Re: Character Sequence Generation

2005-09-22 Thread Devan L
Jeff Schwab wrote: [EMAIL PROTECTED] wrote: Jeff Schwab wrote: What's the best way to generate a sequence of characters in Python? I'm looking for something like this Perl code: 'a' .. 'z' . import string print string.ascii_lowercase abcdefghijklmnopqrstuvwxyz Thanks. Is