Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34654

Re: String manipulation in python..NEED HELP!!!!

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Peter Pearson <ppearson@nowhere.invalid>
Newsgroups comp.lang.python
Subject Re: String manipulation in python..NEED HELP!!!!
Date 11 Dec 2012 22:21:18 GMT
Lines 12
Message-ID <aippuuF3grkU1@mid.individual.net> (permalink)
References <d6779e35-32b8-417a-abf9-72454573bf56@googlegroups.com> <50c761c6$0$12435$a8266bb1@newsreader.readnews.com>
X-Trace individual.net Z/+COdwNKBCZsscNCE8/Nw5IQJE2G2dvouxfKe2HU9UjPUOteRkG4GbV+56/UBCPWQ
Cancel-Lock sha1:YqKd+vR+uJOXFqmB5S2LcLuwTas=
User-Agent slrn/pre1.0.0-18 (Linux)
Xref csiph.com comp.lang.python:34654

Show key headers only | View raw


On Tue, 11 Dec 2012 16:39:27 +0000, duncan smith wrote:
[snip]
> >>> alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
> >>> key = "XPMGTDHLYONZBWEARKJUFSCIQV"
> >>> mapping = {}
> >>> for i, ch in enumerate(alpha):
> 	mapping[ch] = key[i]

mapping = dict(zip(alpha, key))

-- 
To email me, substitute nowhere->spamcop, invalid->net.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

String manipulation in python..NEED HELP!!!! qbailey@ihets.org - 2012-12-10 14:38 -0800
  Re: String manipulation in python..NEED HELP!!!! John Gordon <gordon@panix.com> - 2012-12-10 22:59 +0000
    Re: String manipulation in python..NEED HELP!!!! Terry Reedy <tjreedy@udel.edu> - 2012-12-11 14:30 -0500
      Re: String manipulation in python..NEED HELP!!!! Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-12-11 15:52 -0500
        Re: String manipulation in python..NEED HELP!!!! Tim Delaney <timothy.c.delaney@gmail.com> - 2012-12-12 08:34 +1100
  Re: String manipulation in python..NEED HELP!!!! Vlastimil Brom <vlastimil.brom@gmail.com> - 2012-12-11 00:25 +0100
  Re: String manipulation in python..NEED HELP!!!! Chris Angelico <rosuav@gmail.com> - 2012-12-11 10:36 +1100
  Re: String manipulation in python..NEED HELP!!!! duncan smith <buzzard@invalid.invalid> - 2012-12-11 16:39 +0000
    Re: String manipulation in python..NEED HELP!!!! Peter Pearson <ppearson@nowhere.invalid> - 2012-12-11 22:21 +0000

csiph-web