See I've made a short little login that works with a dictionary, but I don't know how to add something to the dictionary while the program is running, so if you know how to fix this can you please help. Much apperciated.
database = {'name1': '1234', 'name2': '5678', 'name3': '9012'}
name = raw_input('Enter username: ')
pass = raw_input('Enter password: ')
if pass in database[name]:
print 'Welcome', name
else:
pirnt 'Invalid password or username'