#coding: utf-8
with open('1.txt') as fh:
s = fh.read()
print(type(s))
print(s)
parser_result = u'баба-яга'
print(parser_result + s)
Python 2:
Traceback (most recent call last):
File "C:/Users/holodnuk/Desktop/ChaineR-master/test.py", line 10, in <module>
print(parser_result + s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
<type 'str'>
кощей
Python 3: все строки юникод
<class 'str'>
кощей
баба-ягакощей