About Unicode Characters

You can write Unicode symbols in Python strings by their names, for example:

1
2
>>> print("Start \N{HEAVY WIDE-HEADED RIGHTWARDS ARROW} End")
Start  End

You can get the name of a Unicode character using the unicodedata module:

1
2
3
>>> import unicodedata
>>> unicodedata.name("😎")
'SMILING FACE WITH SUNGLASSES'

Tips and Tricks Programming Python 3