How to write emoji in print function as string in python?

Question:
How to write emoji in print function as string in python?
Repl link:

code snippet

Lets say you want to search for an emoji, eg. a star emoji :star:
just put it like this:

print('⭐')

and you will be able to print a star.

9 Likes

You can use Unicode, e.g.

print('\u1F389')

Outputs:

🎉
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.