Write a Python program to remove the nth index character from a non-empty string.
String: "Hello world!", index: 5
def remove_character(string, index):
    return string[:index] + string[index+1:]

input_string =  'Hello World!'
index = 5

print(remove_character(input_string, index))