Generate a code for a Python program that removes all instances of a given character from a string.
'Hello World!', 'o'
def remove_letter(word, letter):
    new_word = ''
    for char in word:
        if char != letter:
            new_word += char
    return new_word 

print(remove_letter('Hello World!', 'o'))