```
"""
This code takes two strings and returns a copy of the first string with
all instances of the second string removed
"""
# This function removes the letter from the word in the event that the 
# word has the letter in it
def remove_all_from_string(word, letter):
    while letter in word:
        find_word = word.find(letter)
        word_length = len(word)
        if find_word == -1:
            continue
        else:
            word = word[:find_word] + word[find_word + word_length:] 
    return word
# This call of the function states the word and what letter will be
# removed from the word
print(remove_all_from_string("bananas", "an"))

```

This code is meant to remove a defined string from a larger define string. In this case the larger string is "bananas" and the smaller string which is removed is "an".

In this case the smaller string is removed multiple times. I believe I am very close to the solution of getting the correct output, but I need the code to output "bas". Instead, it outputs "ba".

The code is supposed to remove all instances of "an" and print whatever is left, however it does not do this. Any help is appreciated.