我有一个简短的python脚本,它应该从用户输入的数字中打印unicode字符。但是,它给了我一个错误。你知道吗
这是我的密码:
print("\u" + int(input("Please enter the number of a unicode character: ")))
它给了我一个错误:
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 0-1: truncated \uXXXX escape
为什么会失败?你知道吗
您需要
unicode_escape
字符串本身:示例会话:
相关问题 更多 >
编程相关推荐