Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- login = False
- EnterUserName = input("Enter your username: ")
- ValidUserName = False
- ValidPassWord = False
- file = open("LoginDetails.CSV","r")
- for line in file:
- details = line.split(",")
- UserName = details[0]
- PassWord = details[1]
- while ValidUserName == False:
- if EnterUserName == UserName:
- print("Username Correct! ")
- ValidUserName = True
- if ValidUserName != True:
- print("Incorrect Password - Try again!")
- ValidUserName = False
- while ValidPassWord == False:
- if ValidUserName == True:
- EnterPassWord = input("Enter your password: ")
- if EnterPassWord == PassWord:
- print("Password Correct! ")
- ValidPassWord = True
- if ValidPassWord != True:
- print("Incorrect Password - Try again!")
- if ValidUserName and ValidPassWord == True:
- print("=================")
- print("Login Successful!")
- print("=================")
Add Comment
Please, Sign In to add comment