我正在尝试在循环中打印unicode字符:
for i in range(0, 10):
unicodedata.normalize('NFKD', '\u00a{i}')
但这导致了下一个错误:
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-4: truncated \uXXXX escape
然而,想要的结果是:
¡
¢
£
¤
...
你对如何实现这一点有什么想法吗
Tags:
只需使用^{} (“返回表示Unicode代码点为整数
i
的字符的字符串”)而不是字符串格式相关问题 更多 >
编程相关推荐