Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login():
- file=open("user.txt","r")
- user=input("enter usename")
- password=input("enter password")
- Check=False
- for line in file:
- correct=line.split(":")
- if user==correct[0] and password==correct[1]:
- Check=True
- break
- if Check==True:
- print("succesffuly logged in")
- file.close()
- mainMenu()
- else:
- print("incorrect log in")
- file.close()
- login()
- for line in file:
- correct=line.split(":")
- for line in file:
- correct=line.strip().split(":")
- def login():
- file = open("user.txt", "r")
- user = input("enter usename ")
- password = input("enter password ")
- if ('{0}:{1}'.format(user, password)) in file:
- print('yay')
- else:
- print('Boo !! User not found')
- login()
- def login():
- file = open("user.txt", "r")
- user = input("enter usename ")
- password = input("enter password ")
- for line in file:
- temp_user, temp_password = line.strip().split(':')
- if temp_user == user and temp_password == password.strip():
- print('yay')
- else:
- print('boo username and password not found!')
- login()
Add Comment
Please, Sign In to add comment