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
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:
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
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 =
[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
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
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