Guest User

Untitled

a guest
Mar 28th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def login():
  2. file=open("user.txt","r")
  3. user=input("enter usename")
  4. password=input("enter password")
  5. Check=False
  6. for line in file:
  7. correct=line.split(":")
  8. if user==correct[0] and password==correct[1]:
  9. Check=True
  10. break
  11. if Check==True:
  12. print("succesffuly logged in")
  13. file.close()
  14. mainMenu()
  15. else:
  16. print("incorrect log in")
  17. file.close()
  18. login()
Add Comment
Please, Sign In to add comment