Untitled

 avatar
unknown
plain_text
2 years ago
754 B
3
Indexable
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)


Editor is loading...