Eric V. Smith added the comment: The example is correct. If you type it into a python interpreter, you get the results as shown in the example.
The .replace() method does not modify the string s. It returns the new value. In the example, the new value is displayed, but is not assigned back to s, so s does not change. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: enhancement -> _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23271> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com