Created
December 12, 2017 07:09
-
-
Save shhider/1c580e526c11ae73b28f8eddebc68f46 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
aaa = u'你好' | |
result = '' | |
for i in range(len(aaa)): | |
item = hex(ord(aaa[i])) | |
item = str(item)[2:] | |
item = item.upper() | |
item = item.zfill(4) | |
result = result + item | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment