Currently at the moment im working a small login screen in python, What i want it to do is ask a user to register if theyre isnt a account already created, But one small problem im having is how can i save the username and password into a dictionary, I would also like to know how i would save the dictionary to a .txt file that can be loaded to restore user info/variables if this is possible.
Im not too sure whether im meant to ask for help with my code or im allowed to ask questions like this, I just need a reffernce or a little help. Also just to add im not asking for someone to do it for me, Just to give me a shove in the right direction
Please dont flame me ;p
import sys
import math
user = None
password = None
store = dict()
newUser = True
while newUser == True:
userguess=""
passwordguess=""
print("Hello, Please create a unique username and password.")
user = input("USERNAME: ")
password = input("PASSWORD: ")
store[user] = password
print(store)
That is what i have tried so far, I gathered the storing to dictionary from another page on here, Was just looking for a breakdown on assigning stuff to a key