Question: 
Write a function to replace characters in a string.


Model's Code:
def replace_char(s, old, new):
    return s.replace(old, new)



Sample Correct Code:
def replace_char(str1,ch,newch):
 str2 = str1.replace(ch, newch)
 return str2


Asserts:
assert replace_char("polygon",'y','l')==("pollgon")
assert replace_char("character",'c','a')==("aharaater")
assert replace_char("python",'l','a')==("python")


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 474 of 974: 348/474 (73.41772151898735%): success