How can I print all unicode characters?

前端 未结 6 2607
陌清茗
陌清茗 2021-02-19 17:36

I want to print some unicode characters but u\'\\u1000\' up to u\'\\u1099\'. This doesn\'t work:

for i in range(1000,1100):
    s=unico         


        
6条回答
  •  灰色年华
    2021-02-19 18:32

    Use unichr:

    s = unichr(i)
    

    From the documentation:

    unichr(i)

    Return the Unicode string of one character whose Unicode code is the integer i. For example, unichr(97) returns the string u'a'.

提交回复
热议问题