with open('UTF32.red.codes', 'rb') as emof:
    codes = [emo.decode('unicode-escape').strip() for emo in emof]
emojis = re.compile('(%s)' % '|'.join(map(re.escape, codes)))
search = 'string to check \U0001f601'
How to build a regular vocabulary of emoticons in python?