Converting emojis to Unicode and vice versa in python 3
# -*- coding: UTF-8 -*-
text = u"?"
print(text.encode('unicode-escape').decode('ASCII')) # output: \U0001f188\ue513\ue220\ue21c
Converting emojis to Unicode and vice versa in python 3
# -*- coding: UTF-8 -*-
text = u"?"
print(text.encode('unicode-escape').decode('ASCII')) # output: \U0001f188\ue513\ue220\ue21c