REPOST: Re: Range of characters?

Chris Dutton cmbchris at mac.com
Wed Dec 26 23:10:02 EST 2001


in article 3C2A074D.8214E5E0 at earthlink.net, Mari Mcdade at
wurmy at earthlink.net wrote on 12/26/01 12:27 PM:

> You don't need the string module, really, but using the literal
> string "ABCDEFGHIJKLMNOPQRSTUVWXYZ" seemed a bit ugly. ;-)

Well, this is even less ugly then.

from string import uppercase as u
for c in u: 
    print "%sython" % c

or, in my new love, Ruby...

for c in "A".."Z"
    puts "%sython" % c
end

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool0-nwblwi.newsops.execpc.com!newsfeeds.sol.net!news-out.visi.com!hermes.visi.com!out.nntp.be!propagator-SanJose!in.nntp.be!news-in-sanjose!news-xfer.nuri.net!news-hub.kaist.ac.kr!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Chris Dutton <cmbchris at mac.com>
Newsgroups: comp.lang.python
Subject: cmsg cancel <B850094A.C53%cmbchris at mac.com>
Control: cancel <B850094A.C53%cmbchris at mac.com>
Date: Mon, 31 Dec 2001 05:28:31 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.B850094A.C53%cmbchris at mac.com>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009775933 27193 211.57.49.2 (31 Dec 2001 05:18:53 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 05:18:53 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list