【发布时间】:2016-01-12 16:35:14
【问题描述】:
我正在寻找如何将十进制 unicode 转换为字符串的简单方法。
例如:
我需要将数字 76 转换为符号“L”。 我需要类似这个页面的东西:https://www.branah.com/unicode-converter
感谢您的帮助
【问题讨论】:
标签: python-2.7 unicode converter unicode-string
我正在寻找如何将十进制 unicode 转换为字符串的简单方法。
例如:
我需要将数字 76 转换为符号“L”。 我需要类似这个页面的东西:https://www.branah.com/unicode-converter
感谢您的帮助
【问题讨论】:
标签: python-2.7 unicode converter unicode-string
chr 函数是您在 Python3 上寻找的,unichr 在 Python2 上寻找的功能。
>>> u''.join(unichr(x) for x in [77,65,82,75])
u'MARK'
【讨论】: