Created
October 1, 2025 13:43
-
-
Save pixeljammed/7e94f90adcca3ebe382173a16b294ea8 to your computer and use it in GitHub Desktop.
code_review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # == YOUR CODE == | |
| def is_valid(password): | |
| special_characters = "!@$%&" | |
| return(len(password) > 7 and any(special_char in password for special_char in special_characters)) | |
| class PasswordManager(): | |
| def __init__(self): | |
| self.passwords = {} | |
| def add(self, service, password): | |
| if(is_valid(password)): | |
| self.passwords.update({service: password}) | |
| def get_for_service(self, service): | |
| return(self.passwords.get(service)) | |
| def list_services(self): | |
| return(self.passwords.keys()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment