What to do if when reading the list - the characters are readable, and after converting it to a string - lose their readability? What to do with the string? Teach
For example:
for i in range(0, len(fullTEXT)): print fullTEXT[i].text textList.append(fullTEXT[i].text) Известно, что нервные клетки
fullTEXT = str(textList) print fullTEXT [u'\u0418\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043d\u0435\u0440\u0432\u043d\u044b\u0435 \u043a\u043b\u0435\u0442\u043a\u0438']
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)errorUnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)too, because of this. - 0x0718repr()may show some Unicode characters without an'\uhhhh'escapes, only makes the problem less obvious. In Python 3, I watched people start complaining in such situations: "why did the characters appear in my text['',]"(or worse:.replace('[', '')etc. would start appearing in the code) . The real problem is not related to the Python version, but to the lack of understanding of the difference betweenobjandrepr(obj). - jfs