Can't use unichr in Python 3.1

后端 未结 5 1042
别那么骄傲
别那么骄傲 2021-02-03 16:33

I\'ve been looking through the Python Cookbook (2nd Edition) to learn how to process strings and characters.

I wanted to try converting a number into its

5条回答
  •  爱一瞬间的悲伤
    2021-02-03 17:22

    Python 3.x doesn't have a special Unicode string type/class. Every string is a Unicode string. So... I'd try chr. Should give you what unichr did pre-3.x. Can't test, sadly.

提交回复
热议问题