How can I print all unicode characters?

前端 未结 6 2582
陌清茗
陌清茗 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:27

    if you'd like to print the characters corresponding to an arbitrary unicode range, you can use the following (python 3)

    unicode_range = ('4E00', '9FFF')  # (CJK Unified Ideographs)
    characters = []
    for unicode_character in range(int(unicode_range[0], 16), int(unicode_range[1], 16)):
        characters.append(chr(unicode_character))
    

提交回复
热议问题