Created
October 23, 2020 03:34
-
-
Save ericosur/e0d1e993d2750e04e6729ec5457b9907 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# coding: utf-8 | |
s = 'β€οΈπ§π΄πββοΈππ' | |
print(s) | |
line = '"' | |
for cc in s: | |
hx = hex(ord(cc)) # str, 0x1f1e7 | |
hx = hx.upper() | |
hx = hx.replace('0X','\\u') | |
line += hx | |
line += '"' | |
print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment