Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- userinput = input("Username: ")
- userinput += ".txt"
- file = open(userinput, "w")
- passchoice = input("Password: ")
- file.write(passchoice)
- print("")
- userinput = input("Username: ")
- userinput += ".txt"
- file = open(userinput, "r")
- password = file.readline()
- file.close()
- passinput = input("Password: ")
- if(password == passinput):
- print("HUZZAH!")
- userinput = input("Username: ")
- userinput += ".txt"
- file = open(userinput, "w")
- passchoice = input("Password: ")
- file.write(passchoice)
- file.write("/n") #Note the addition of the newline
- print("")
- userinput = input("Username: ")
- userinput += ".txt"
- file = open(userinput, "r")
- password = file.readline()
- file.close()
- password = password.strip("") #stripping whitespace as instructed
- passinput = input("Password: ")
- if(password == passinput):
- print("HUZZAH!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement