Finding characters in a string
def replace_it(text):
new_text = text.replace("l", "q")
return new_text
Function Call | Return Value | |||
---|---|---|---|---|
replace_it('Walla Walla') | → | |||
replace_it('lollipop') | → | |||
replace_it('animal') | → | |||
replace_it('Lemur') | → | |||
replace_it('Logically') | → |
Experiment with this code on Gitpod.io