Answer the question
In order to leave comments, you need to log in
How to convert string from Unicode characters directly to Unicode itself (Python 3)?
If you use the literal u when declaring a variable, then everything is fine.
# coding: utf-8
s = "\u041f\u0440\u043e\u0441\u043c\u043e\u0442"
Answer the question
In order to leave comments, you need to log in
?
In [1]: s = "\u041f\u0440\u043e\u0441\u043c\u043e\u0442"
In [2]: print(str(s))
Просмот
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question