In this article we shall how to print emojis to the console. It would be cool to see emojis in our console right. Let us get started with the installation of a python package called “emoji“.
This package can be easily installed using pip. Just type the following command in your terminal and you are good to go.
pip install emoji
This is how we can print an emoji to our console. The emojize method from the emoji class takes a CLDR short name of the emoji and prints the emoji in our console.
This will print something like this in our console.
Yay it worked 👍
Let us see some more examples.
These lines will print respectively,
We can also use the demojize function to find the unicode from the emoji.
This will give us the following output.
Let me list some of the examples from the emoji cheat sheet.
If you want more examples take a look at this website.
Hope this article was helpful and fun.