Another solution is to use the name aliases and print them using the string literal \N

print('\N{grinning face with smiling eyes}')

Current list of name aliases can be found at: https://unicode.org/Public/15.0.0/ucd/UnicodeData-15.0.0d6.txt

Or the Folder for everything here: https://unicode.org/Public/

Answer from nth-attempt on Stack Overflow
🌐
PyPI
pypi.org › project › emoji
emoji · PyPI
Emoji for Python. This project was inspired by kyokomi. The entire set of Emoji codes as defined by the Unicode consortium is supported in addition to a bunch of aliases.
People also ask

What are unicodes?
Unicodes are a standardized system of identifying and encoding characters from various writing systems around the world. Each character is assigned a unique number or code point, enabling computers and other devices to display and recognize them regardless of the language or script used. Unicodes include characters from languages such as Arabic, Chinese, Cyrillic, Greek, Hebrew, Hindi, Japanese, Korean, and Latin, among others. They are widely used in software development, web design, and other digital applications.
🌐
askpython.com
askpython.com › python-modules › emoji-module
Python Emoji Module: A Complete Guide - AskPython
Where can I find the Emoji Cheat Sheet?
To find the appropriate text or Unicode representation for a specific emoji, you can use an emoji cheat sheet. Websites like Emojipedia or the Unicode Emoji List provide comprehensive lists of emojis and their corresponding text and Unicode values. This can be helpful when you need to find a specific emoji for your project.
🌐
askpython.com
askpython.com › python-modules › emoji-module
Python Emoji Module: A Complete Guide - AskPython
🌐
Data Science Discovery
discovery.cs.illinois.edu › guides › Other-Forms-Of-Visualizations › using-emojis-in-python
Generating Emojis in Python - Data Science Discovery
April 12, 2024 - To generate emojis using Unicode escape sequences, simply use the \U escape sequence followed by the hexadecimal code point for the desired emoji. For example, the Unicode code point for the chipmunk emoji 🐿 is U+1F43F, which can be represented ...
🌐
Educative
educative.io › answers › how-to-print-emojis-using-unicodes-in-python
How to print emojis using Unicodes in python
In python, emojis can be printed using their respective Unicodes. For example, the grinning face with big eyes emoji has a Unicode of U+1F603.
🌐
Unicode
unicode.org › emoji › charts › full-emoji-list.html
Full Emoji List, v18.0
This chart provides a list of the Unicode emoji characters and sequences, with images from different vendors, CLDR name, date, source, and keywords. The ordering of the emoji and the annotations are based on Unicode CLDR data. Emoji sequences have more than one code point in the Code column.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-program-to-print-emojis
Python program to print Emojis - GeeksforGeeks
February 11, 2022 - For example - "U+1F600" will become "U0001F600" and prefix the unicode with "\" and print it. ... # grinning face print("\U0001f600") # grinning squinting face print("\U0001F606") # rolling on the floor laughing print("\U0001F923") ... # grinning ...
🌐
AskPython
askpython.com › python-modules › emoji-module
Python Emoji Module: A Complete Guide - AskPython
May 17, 2021 - All we need to do is replace the + in the Unicode with 000 to get the correct Unicode. Printing emoji using Unicode is very simple which doesn’t require any function other than the print statement along with a backslash (\) before the Unicode ...
Find elsewhere
Top answer
1 of 2
49

'😀' is already a Unicode object. UTF-8 is not Unicode, it's a byte encoding for Unicode. To get the codepoint number of a Unicode character, you can use the ord function. And to print it in the form you want you can format it as hex. Like this:

s = '😀'
print('U+{:X}'.format(ord(s)))

output

U+1F600

If you have Python 3.6+, you can make it even shorter (and more efficient) by using an f-string:

s = '😀'
print(f'U+{ord(s):X}')

BTW, if you want to create a Unicode escape sequence like '\U0001F600' there's the 'unicode-escape' codec. However, it returns a bytes string, and you may wish to convert that back to text. You could use the 'UTF-8' codec for that, but you might as well just use the 'ASCII' codec, since it's guaranteed to only contain valid ASCII.

s = '😀'
print(s.encode('unicode-escape'))
print(s.encode('unicode-escape').decode('ASCII'))

output

b'\\U0001f600'
\U0001f600

I suggest you take a look at this short article by Stack Overflow co-founder Joel Spolsky The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!).

2 of 2
4
sentence = "Head-Up Displays (HUD)💻 for #automotive🚗 sector\n \nThe #UK-based #startup🚀 Envisics got €42 million #funding💰 from l… "
print("normal sentence - ", sentence)

uc_sentence = sentence.encode('unicode-escape')
print("\n\nunicode represented sentence - ", uc_sentence)

decoded_sentence = uc_sentence.decode('unicode-escape')
print("\n\ndecoded sentence - ", decoded_sentence)

output

normal sentence -  Head-Up Displays (HUD)💻 for #automotive🚗 sector
 
The #UK-based #startup🚀 Envisics got €42 million #funding💰 from l… 


unicode represented sentence -  b'Head-Up Displays (HUD)\\U0001f4bb for #automotive\\U0001f697 sector\\n \\nThe #UK-based #startup\\U0001f680 Envisics got \\u20ac42 million #funding\\U0001f4b0 from l\\u2026 '


decoded sentence -  Head-Up Displays (HUD)💻 for #automotive🚗 sector
 
The #UK-based #startup🚀 Envisics got €42 million #funding💰 from l… 
🌐
PyPI
pypi.org › project › emoji-unicode
emoji-unicode · PyPI
Replace unicode emojis by its corresponding image representation. Supports Unicode 9 standard.
      » pip install emoji-unicode
    
Published: Oct 10, 2017
Version: 0.4
🌐
MakeUseOf
makeuseof.com › home › programming › how to include emojis in your python code
How to Include Emojis in Your Python Code
April 11, 2021 - Unicode is a universal character ... has a unique Unicode assigned to it. When using Unicode with Python, replace "+" with "000" from the Unicode....
🌐
Plain English
python.plainenglish.io › how-python-handles-emojis-and-unicode-the-fun-and-practical-guide-e22abfa2e499
How Python Handles Emojis and Unicode — The Fun and Practical Guide | by Moh Haziane | Python in Plain English
October 15, 2025 - To fix this limitation, developers created Unicode — a universal standard that assigns a unique number (called a code point) to every character and symbol used in writing systems across… ... New Python content every day.
🌐
Medium
medium.com › @rushikeshjaisur11 › how-to-print-emoji-in-python-8f53ab2b3236
How to print emoji in python. Emoji are fun and expressive symbols… | by Rushikeshjaisur | Medium
May 4, 2023 - https://unicode.org/emoji/char... unicode, you need to know its code point, which is a hexadecimal number that identifies the character. For example, the code point for the smiling face emoji is U+1F600....
🌐
epsilon
epsilon.newpointe.org › home › f4d › 161 › unicode emoji python
Unicode Emoji Python - epsilon
Use the `emoji` library, which provides a simple way to work with emojis in Python. You can install it using pip: `pip install emoji`. Use the `unicodedata` module to manipulate Unicode strings and convert them to emoji representations.
🌐
EIPosgrados
eiposgrados.com › python › emojis with python
Emojis with Python
October 29, 2021 - In Python we can use several ways to output emojis. ... CLDR names. ... To use Unicodes, we need to replace “+” with “000” from the Unicodes list.
🌐
Carpedm20
carpedm20.github.io › emoji › docs › index.html
emoji — emoji documentation
emoji supports Python 3.8+. The last version to support Python 2.7 and 3.5 was v2.4.0. The main purpose of this package is converting Unicode emoji to emoji names and vice versa with emojize() and demojize().
🌐
w3resource
w3resource.com › python-exercises › basic › python-basic-1-exercise-143.php
Python: Print Emojis using unicode Characters or CLDR (Common Locale Data Repository ) short names - w3resource
May 24, 2025 - # Printing a rolling on the floor laughing face using Unicode character name. print("Rolling on the floor laughing:") print("\N{rolling on the floor laughing}") # Printing a smiling face with halo using Unicode character name. print("Smiling face with halo:") print("\N{smiling face with halo}") # Printing an unamused face using Unicode character name. print("Unamused face:") print("\N{unamused face}") # Printing a grinning face using Unicode character name. print("Grinning face:") print("\N{grinning face}") # Printing a loudly crying face using Unicode character name. print("Loudly crying face
🌐
Carpedm20
carpedm20.github.io › emoji
List of all emojis in the emoji python package
Overview of all emoji made availabe by the carpedm20/emoji python package. Search through all emoji and copy their Unicode, HTML entities or python code
🌐
freeCodeCamp
freecodecamp.org › news › a-beginner-friendly-guide-to-unicode-d6d45a903515
A Beginner-Friendly Guide to Unicode in Python
July 18, 2018 - Since we’ve now entered the world of Unicode, we need to first dissociate emojis from the wonderfully expressive icons they are, and associate them with something much less exciting. So instead of thinking about emojis in terms of the things or the emotions that they represent, we will instead think about each emoji as a plain number.
🌐
GitHub
github.com › carpedm20 › emoji
GitHub - carpedm20/emoji: emoji terminal output for Python · GitHub
Emoji for Python. This project was inspired by kyokomi. The entire set of Emoji codes as defined by the Unicode consortium is supported in addition to a bunch of aliases.
Author: carpedm20