s = ("Sorry Try Again") name = input("Username:") if name == ('Nathan'): name = True password = int(input('Password:')) if password == (23): password = True print ('Welcome') elif password != (23): password = False elif name != ('Nathan'): name = False while name == True and password ==True: print('\n\t\t\tOptions\n') change = int(input('1 Change Passsword \n2 End \n\n')) if change == 1: newpassword = input('New password: ') elif change == 2: print('ending') break while name == False or password == False: print(s) break
The program goes like this. It asks for a Username and password and if both are correct, it displays options. I have a change password option and i want it to change the value of the original password to the new one inputed by the user. What would be the best method for doing so?