Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
754 B
0
Indexable
Never
if user in store_user:
    print "That user already exsist"
else:
    store_user.append(user)
    store_pass.append(password)


store = dict()
# the code to get the user/password
store[user] = password # you "save" the value password for the key user

# then to check:
while not (userguess in store and store[userguess] == passwordguess):
   # try again


def add_user(store):
    user = raw_input('Create Username: ')
    password = raw_input('Create Password: ')
    if user in store:
        print "That user already exsist"
        return False
    else:
        store[user] = password
        return True

# and call this 10 times for example...
global_store = dict()
for i in range(10):
    add_user(global_store)