keys = ['cat', 'dog', 'mouse']
text = 'Cat dog cat cloud miracle DOG MouSE'
for w in text.split():
    if w.lower() in keys:
        print('[%s]%s' % (w, w.lower()), end=' ')
else:
    print(w, end=' ')
How to replace by regular expression to lowercase in python