How to reverse lookup characters in list?

Bob Gailer bgailer at alum.rpi.edu
Mon Jul 28 10:58:00 EDT 2003


At 06:11 AM 7/28/2003 +0000, Keith Jones wrote:

>okay, isn't the number in the list the index of the new letter? So you'd
>just use alphabet[d].. though what you're doing can be done in a much
>simpler manner..
>
>for starters... check out the string module. you can do
>
>import string
>string.lowercase
>
>that gives you a-z, lowercase.. I think you'll be fine with a string,
>rather than a list (infact, it's better since it's immutable). If you must
>ahve a list, you can do
>
>[a for a in string.lowercase]

Or just list(string.lowercase])
[snip]

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/2003


More information about the Python-list mailing list