I have issues with displaying Unicode characters. As an output I have this list (only on online IDEs):
[u'\u0413', u'\0434', u'\043b']
How can I convert this sequence to normally visible text?
I have
# -*- coding: utf-8 -*-
in header and also each string marked as Unicode like u'String'
I tried to use code:
myList = repr([x.encode(sys.stdout.encoding) for x in lst]).decode('string-escape')
but it's not working and output still the same.
In Python 3, this will work directly:
In Python 2, you can use the print statement to print individual values: