o4-mini-2025-04-16· OpenAI
LMArena Human Preference 140K
How do I print emoji in Python?
- User
How do I print emoji in Python?
- Assistant
Here are a few ways to print emoji in Python 3.x (which uses Unicode by default):
- Directly embed the emoji literal
# console/IDE must support Unicode print("Hello 🌍!")- Use the Unicode code point escape
# U+1F600 is 😀 print("\U0001F600") # or multiple: print("Python is fun \U0001F40D \U0001F47E")- Use chr() with the code point
# 0x1F602 is 😂 print(chr(0x1F602))- Via the
emojipackage (named aliases → emoji)
pip install emojifrom emoji import emojize print(emojize("Python is :thumbs_up:")) print(emojize("I :heart: programming!"))
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.