Login and get codingPython 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 | π ...