7.6 / 10 123... Official

While the CodeHS exercise often requires the manual loop approach above, the simplest way to do this in standard Python is using the .replace() method:

def remove_all_from_string(word, letter): return word.replace(letter, "") Use code with caution. Copied to clipboard 7.6 / 10 123...

You can solve this using a while loop to repeatedly find and remove the target substring until it no longer exists in the word. While the CodeHS exercise often requires the manual