A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/302243.html below:

Character Sequence Generation

Character Sequence Generation Character Sequence GenerationDevan L devlai at gmail.com
Fri Sep 23 00:20:32 EDT 2005
Jeff Schwab wrote:
> mensanator at aol.com 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 the characters dynamically?

''.join([chr(i) for i in range(97,123)])


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4