I have to make code that lets you create an account or log in and it must save the accounts to a text file, I have done the create account but its very badly done and don't have a clue how to do the login as I don't understand read files, thank you for any help
(Login code I wrote)
(Login code I wrote)
1 2 3 4 5 6 7 |
def reg(): uname = input ( "Please a username: " ) pword = input ( "Please a a passwrd: " ) f = open ( "UNPW.txt" , "a" ) f.write( "\nUsername:" + uname) f.write( "\nPasswod:" + pword) f.write( "\n----------------------------" ) |