My problem is i only want my if statement to run if the input is exactly the password not more or less but exactly the password. what it does is still works if it has extra characters on the end or beginning. for example say my password is
if esa in ("hi"):
print ("correct password")
userPassword = input("Enter password: ") myPassword = "hi" if userPassword==myPassword: print("Correct password") else: print("Incorrect password")
edit: it's really unclear what you want to be honest, this is just my best shot at helping you. if you comment with more info I can further help you!