import re
inputt = input()
# write the characters you want to remove in square brackets
line = re.sub('[ie]', '', inputt)
print(line)
>>> string = 'This is a string, with words!'
>>> string.split()
['This', 'is', 'a', 'string,', 'with', 'words!']
s = 'This is a sentence with unwanted characters.AAAAAAAA'
print('Strip unwanted characters: {}'.format(s.rstrip('A')))
# Output
# Strip unwanted characters: This is a sentence with unwanted characters.