dimanche 30 mai 2021

The values of both the variables are same but still the True block doesn't get executed?

for row in range(1, 100):
        #print(ws["C"+ str(row)].value)
        if ws["C"+ str(row)].value == entered_username:
            if ws["D"+ str(row)] == entered_password:
                dashboard()
            else:
                Label(l_screen,text="Incorrect password!!").pack(pady = 10) 
        else:
            Label(l_screen,text="Username not found.").pack(pady = 10)

When checking the ws["C"+ str(row)].value and entered_username separately, both are same(checked the type function as well). but the code block always returns "Username not found"

Aucun commentaire:

Enregistrer un commentaire