class User:
    def __init__(self, id, password):
        self.id = id
        self.password = password

    def set_password(self,new_pw):
        if len(self.password) >= 8 and any(temp.isdigit()for temp in self.password) == True:
            new_pw = self.password
        else:
            print("설정 실패")

    def check_login(self,input_id, input_pw):
        return self.id == input_id and self.password == input_pw


user = User("kim", "init1234")

user.set_password("abc12")
user.set_password("init1234")
print(user.check_login("kim", "init1234"))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: