Larry Bates <[EMAIL PROTECTED]> writes:
> IMHO the most elegant method is something like:
> 
> def switchchar(srcstring, position, character):
>     b=list(srcstring)
>     b[2]=character
>     return ''.join(b)

If the strings or large or you're doing it a lot, the array module is
likely more efficient.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to