7.6 / 10 123... Online

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:

: word[:index] takes everything before the letter, and word[index + len(letter):] takes everything after it. Adding them together effectively "deletes" the unwanted part. 7.6 / 10 123...

: The while True ensures the code keeps searching until every instance is gone, which is necessary if the letter appears multiple times (e.g., removing "na" from "banana"). Alternative (Standard Python) While the CodeHS exercise often requires the manual

The prompt likely refers to from the CodeHS Python curriculum. This exercise requires you to write a function that removes every instance of a specific "letter" (or substring) from a given word. Correct Python Implementation 7.6 / 10 123...