[Tutor] Python Challenge - Riddle 2

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Mon May 9 15:49:43 CEST 2005


John Carmona wrote:

> OK I am stuck on this one. I see what I need to do (correct me if I am 
> wrong). But I need to write a script that will replace each letter by 
> another one (In this case a --> c etc.). I look at String, List and 
> Dictionary. I thought I could use the text.replace option but I am not sure. 
> Anybody to put me in the right track.

There are different ways to do this; IIRC I did it using ord, chr and a 
list comprehension.

Note that there is a forum for hints: http://www.pythonchallenge.com/forums/

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Tutor mailing list