GolovDanil GolovDanil - 12 days ago 7
Python Question

How to get cyrillic symbol by it's code

I can get code of cyrillic symbol. For example

# -*- coding: utf-8 -*-

s = u'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'
print ord(s[0])

1072
[Finished in 0.0s]


But I can't get cyrillic symbol by it's code. Help me please

Answer
unichr(1072)
>> u'\u0430'

print unichr(1072)
>> а
Comments