What is my error in this string function? Cannot figure out what I did wrong.
Return a string like s, but with all instances of orig replaced with repl.
Example:
>>> replace('Hellx wxrld', 'x', 'o')
'Hello world'
def replace(s, orig, repl):
s.replace(orig, repl)
return s
s.replacecan't change the value ofs, it can only create a new one.