Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def runUser():
- x = raw_input("Enter your username:")
- y = raw_input("Enter your password :")
- users = [x == "aeduun" and y == "1234", x == "paul" and y == "fifty"]
- raw_input("")
- if x == users[] and y == users[]:#x == "aeduun" and y == "1234":
- print "you are now logged in"
- elif x == "Mercuryisle" and y == "shrek":
- print "Your account has expired..."
- "You will now bw taken back to the login page"
- time.sleep(5)
- return runUser()
- users = set([("aeduun","1234"), ("paul","fifty")])
- expired_users = set([("Mercuryisle", "shrek")])
- . . .
- if (x,y) in users:
- print "you are now logged in
- elif (x,y) in expired_users:
- print "Your account has expired..."
- . . .
- def runUser():
- x = raw_input("Enter your username: ")
- y = raw_input("Enter your password: ")
- users = {"aeduun":"1234", "paul":"fifty"}
- raw_input("")
- if x in users:
- if y == users[x]:
- print "you are now logged in"
- elif x == "Mercuryisle" and y == "shrek":
- print "Your account has expired..."
- "You will now bw taken back to the login page"
- time.sleep(5)
- return runUser()
- >>> runUser()
- Enter your username: aeduun
- Enter your password: 1234
- you are now logged in
- Enter your username: Mercuryisle
- Enter your password: shrek
- Your account has expired...You will now bw taken back to the login page
- Enter your username:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement