I've created a function which creates a new password. But I want a function to store it in a text file from which it will be called when the program is started.

Also how do I make an edit or delete password function? As the password will have to be called from the file to edit and store back,I do not know how to do create it.

def new_password():
    password = input ("Enter a password: ")
    verify = input ("Re-enter your password: ")
    while password != verify:
        print("Enter your password correctly.")
        password = input ("Enter a password. ")
        verify = input ("Re-enter yourpassword: ")
    print("Password created")
    return password
7 Years
Discussion Span
Last Post by pyTony
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.