Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fr = open('accounts.txt', 'r')
- while True:
- username = input('Enter your username: ') # Ask for their username
- if username in fr.read(): # Check if username exists
- password = input('Enter password: ') # Ask for password if username exists
- if username+password in fr.read():
- print('Welcome ' + username)
- break
- else:
- print('Wrong password')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement