Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (1.5k points)
I was just wondering if i can display an emoji in Python. Please help me in this.

1 Answer

0 votes
by (7.2k points)

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.

# import emoji module 

import emoji

print(emoji.emojize(":grinning_face_with_big_eyes:"))

print(emoji.emojize(":winking_face_with_tongue:"))

print(emoji.emojize(":zipper-mouth_face:"))

Browse Categories

...