How can I print all unicode characters?

前端 未结 6 2569
陌清茗
陌清茗 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条回答
  •  梦毁少年i
    2021-02-19 18:20

    You'll want to use the unichr() builtin function:

    for i in range(1000,1100):
        print i, unichr(i)
    

    Note that in Python 3, just chr() will suffice.

提交回复
热议问题