import time file = open("login.txt","r") TrueUsername = file.readline(1) TruePassword = file.readline(2) print("Log in") time.sleep(0.5) Username1 = input("Username:") Password1 = input("Password:") if Username1 == TrueUsername and Password1 == TruePassword: print("Welcome.") else: print("Try again.") file.close()---Whenever I write the correct password and username on the .txt file it prints "Try again."
Why doesn't this work?
Messages In This Thread |
Why doesn't this work? - by Saladrang - Apr-16-2018, 01:53 PM
RE: Why doesn't this work? - by j.crater - Apr-16-2018, 01:55 PM
RE: Why doesn't this work? - by Saladrang - Apr-16-2018, 02:01 PM
RE: Why doesn't this work? - by vervoortraf - Apr-16-2018, 02:12 PM
RE: Why doesn't this work? - by woooee - Apr-16-2018, 04:44 PM
RE: Why doesn't this work? - by IAMK - Apr-17-2018, 11:43 AM
|
Users browsing this thread: 2 Guest(s)