Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login():
- logstart = input("Do you have an account? ").lower()
- if logstart == "yes":
- while True:
- username = input("Username: ")
- password = input("Password: ")
- if username in logins:
- if logins[username] == password:
- return username
- else:
- print_slow("Your password is incorrect.")
- else:
- print_slow("You don't exist.")
- elif logstart == "no":
- while True:
- username = input("Username: ")
- password = input("Password: ")
- confirm = input("Confirm password: ")
- if username in logins:
- print_slow("Sorry this already exists.")
- elif password != confirm:
- print_slow("there is a miss match with your passwords.Try again")
- else:
- logins[username] = password
- log = open("logins.pkl", "wb")
- pickle.dump(logins, log)
- log.close()
- break
- else:
- print_slow("That is not the correct input")
- print("")
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement