In the following code im trying to make a login page but i encountered a problem here. the problem is,
print(bool(verfied)) shows a error and says
unresolved reference 'verified'.I would like the function to return a boolean value after it is called through the button.please help!!
def verification(): verified = False if str(username_login.get()) == '1' and str(password_login.get()) == '1': verified = True elif str(username_login.get()) != '1' and str(password_login.get()) != '1': verified = False return verified login_button = Button(screen, text='Login', command=verification) login_button.place(relx=0.5, rely=0.45, anchor='center') print(bool(verified))