Advertisement
Guest User

Untitled

a guest
Mar 16th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def login():
  2. with open("student_records.csv", "r") as file:
  3. read=csv.reader(file)
  4. invalid_login = True
  5. while invalid_login == True:
  6. username = input ('What is your username')
  7. password = input ('What is your password')
  8. for each in read:
  9. print (each)
  10. if username in each and password in each:
  11. print ('record was found')
  12. invalid_login = False
  13. test()
  14.  
  15. else:
  16. break
  17. print('Incorrect username or password')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement