Apr-16-2018, 01:53 PM
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."