I have two .py scripts and I want from main script to edit script where the password is stored. Here is the script with password:
import getpass, os
def log_in():
Username = "username"
Password = "password"
getUsername = input("Username:")
while getUsername != Username:
print("Wrong username")
getUsername = input("Username:")
x = 0
while x < 5:
getPass = getpass.getpass("Password:")
if getPass != Password:
print("Password is invalid")
x = x + 1
else:
print("Welcome back sir\n")
x = 10
So if I want to let user change Password with their input but is it possible and if it is, how?