Guest User

Untitled

a guest
Oct 2nd, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. if user in store_user:
  2. print "That user already exsist"
  3. else:
  4. store_user.append(user)
  5. store_pass.append(password)
  6. store = dict()
  7. # the code to get the user/password
  8. store[user] = password # you "save" the value password for the key user
  9.  
  10. # then to check:
  11. while not (userguess in store and store[userguess] == passwordguess):
  12. # try again
  13. def add_user(store):
  14. user = raw_input('Create Username: ')
  15. password = raw_input('Create Password: ')
  16. if user in store:
  17. print "That user already exsist"
  18. return False
  19. else:
  20. store[user] = password
  21. return True
  22.  
  23. # and call this 10 times for example...
  24. global_store = dict()
  25. for i in range(10):
  26. add_user(global_store)
Add Comment
Please, Sign In to add comment