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()
Add Comment
Please, Sign In to add comment