I have a problem comparing two unicode variables in python 2.7. What I want to do in my program is open a file with characters (they are specifically Japanese characters) and compare with a series of characters of the same type entered by the user.
For some reason, the program skips the comparison even though it already checks that they are the same type of variable.
Here I leave the portion of the code I'm working with.
# -*- coding: utf-8 -*-
na = []
n = open("jap.txt", "r")
for linea in n:
na.append(linea)
n.close()
ingreso = unicode(raw_input("Respuesta: "), "utf-8")
if (ingreso == na[1]):
print "Correcto"
else:
print "Incorrecto"