En Sun, 10 Feb 2008 04:06:54 -0200, [EMAIL PROTECTED]  
<[EMAIL PROTECTED]> escribi�:

> I need to replace s2 = s.replace(c,"!") with a for loop function
> somehow.
>
> I don't really see how a for loop would iterate through the string and
> replace the character, and would like to see an example if possible.

Try starting with an empty string, and building the output one character  
at a time (s = s + x); when you are at the position to be replaced, use  
the replacement character instead.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to