GolovDanil GolovDanil - 1 year ago 129
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])

[Finished in 0.0s]

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

Answer Source
>> u'\u0430'

print unichr(1072)
>> а
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download