GolovDanil
GolovDanil

Reputation: 133

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

Upvotes: 0

Views: 149

Answers (1)

baldr
baldr

Reputation: 2999

unichr(1072)
>> u'\u0430'

print unichr(1072)
>> а

Upvotes: 2

Related Questions