I have these variables:
s1 = '\xd1\x98\xd1\x83\xd0\xbd'
s2 = u'\xd1\x98\xd1\x83\xd0\xbd'
How can I transform variable s2 to be same as s1 so that comparing both will return True.
I have these variables:
s1 = '\xd1\x98\xd1\x83\xd0\xbd'
s2 = u'\xd1\x98\xd1\x83\xd0\xbd'
How can I transform variable s2 to be same as s1 so that comparing both will return True.
You can convert s1 to be the same as s2:
s1 = '\xd1\x98\xd1\x83\xd0\xbd'
s2 = u'\xd1\x98\xd1\x83\xd0\xbd'
s1 = s1.decode('unicode-escape')