Python program to print Emojis
There are multiple ways we can print the Emojis in Python. Let’s see how to print Emojis with Uniocdes, CLDR names and
Every emoji has a Unicode associated with it. Emojis also have a CLDR short name, which can also be used.
From the list of unicodes, replace “+” with “000”. For example – “U+1F600” will become “U0001F600” and prefix the unicode with “\” and print it.
Using CLDR short name:
Using emoji module:
Emojis can also be implemented by using the emoji module provided in Python. To install it run the following in the terminal.
pip install emoji
emojize() function requires the CLDR short name to be passed in it as the parameter. It then returns the corresponding emoji. Replace the spaces with underscore in the CLDR short name.
demojize() function converts the emoji passed into its corresponding CLDR short name.
Below is a list of some common emoji Unicodes with their CLDR short names:
|CLDR Short Name||Unicode|
|grinning face with big eyes||U+1F603|
|grinning face with smiling eyes||U+1F604|
|beaming face with smiling eyes||U+1F601|
|grinning squinting face||U+1F606|
|grinning face with sweat||U+1F605|
|rolling on the floor laughing||U+1F923|
|face with tears of joy||U+1F602|
|slightly smiling face||U+1F642|
|smiling face with smiling eyes||U+1F60A|
|smiling face with halo||U+1F607|
|smiling face with 3 hearts||U+1F970|
|smiling face with heart-eyes||U+1F60D|
|face blowing a kiss||U+1F618|
|kissing face with closed eyes||U+1F61A|
|kissing face with smiling eyes||U+1F619|
|face savoring food||U+1F60B|
|face with tongue||U+1F61B|
|winking face with tongue||U+1F61C|
|squinting face with tongue||U+1F61D|
|face with hand over mouth||U+1F92D|
|face with raised eyebrow||U+1F928|
|face without mouth||U+1F636|
|face with rolling eyes||U+1F644|
|face with medical mask||U+1F637|
|face with thermometer||U+1F912|
|face with head-bandage||U+1F915|
Last Updated on November 13, 2021 by admin