GH avatar Bite 126. The Emoji (Unicode) Bite

Python 3 supports Unicode so we can do cool stuff like ... emojis πŸ˜…

Let's play a bit with emoji-to-text and vice versa. Complete the two functions below to get the meaning of an emoji, and secondly build a lookup of emojis by string.

No external modules required, you will leverage (once more) the standard library: use the unicodedata module. And this is what you will build 😎

$ python emoji.py smiling
Grinning Face With Smiling Eyes                              | 😁
Smiling Face With Open Mouth                                 | πŸ˜ƒ
Smiling Face With Open Mouth And Smiling Eyes                | πŸ˜„
Smiling Face With Open Mouth And Cold Sweat                  | πŸ˜…
Smiling Face With Open Mouth And Tightly-Closed Eyes         | πŸ˜†
...

19 out of 20 users completed this Bite.
Will you be Pythonista #20 to crack this Bite?
It takes an average of ~83 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 5.0 on a 1-10 difficulty scale.
» Up for a challenge? πŸ’ͺ

Login and get coding
We use Python 3.7