Replacing characters in a string
def replace_it(text):
new_text = text.replace("a", "z")
return new_text
Function Call | Return Value | |||
---|---|---|---|---|
replace_it('Anna') | → | |||
replace_it('marsupial') | → | |||
replace_it('banana') | → | |||
replace_it('Mt. Diablo') | → | |||
replace_it('Avocado') | → |
Experiment with this code on Gitpod.io