mercredi 30 août 2017

something wrong with if statement in my code

for line in dictionary:
    var=editdistance.eval(token[0],line.strip())
    if var <=best_var:
        best_var=var
        best_str.append(line.strip())
for String in best_str[-4:]:
    print(String)
    print(token[2])
    #print(best_var)
    if (String == token[2]):
        print('ddf')

For this code, it seems the if statement for string == token[2] never process, I check the condition it have the condition string=token[2]

Aucun commentaire:

Enregistrer un commentaire