How would I save variable such as firstname, surname and passwords in a text document from the python!
print ("Hello, stranger! What is your name?")
firstname = input()
print ("Welcome,", firstname, "! What is your surname?")
surname = input()
print ("Account registred!" "Please choose your password!")
password = input ()
print ("Re-type your desired password!")
passwordre = input ()
if str(password) == str(passwordre):
print ("Your account has finished!")
while str(password)!= str(passwordre):
print ("Password don't match! Account not finished!")
print ("Try again!")
print ("Re-type your desired password!")
passwordre = input ()
if str(password) == str(passwordre):
print ("Your account has finished")
break