Surely you use emojis very often in your daily life, whether on social networks or in WhatsApp conversations or other chat or messaging apps. And they have become a whole way of communicating, to show our mood or make us laugh.
As programmers that we are, today we are going to learn to write code that will output those emojis. If you want to learn to program in this versatile and well-known language in the world of programming, the Master in Advanced Programming in Python for Hacking, Machine Learning and BigData, will give you the necessary skills.
Ways to make emojis with Python
In Python we can use several ways to output emojis.
- Unicode.
- CLDR names.
- emoji module.
We leave you an example of the list of emojis but you can see it in full here
Unicodes
To use Unicodes, we need to replace “+” with “000” from the Unicodes list.
For example “U + 1F600” would be “U0001F600” and the Unicode prefix with “\” will print it.
CLDR names
The emojis have short CLDR names that can also be used.
emoji module
We can also implement emojis using the emoji module in Python. To install it we just have to run it in the terminal pip install emoji