Skip to content

Instantly share code, notes, and snippets.

@pixeljammed
Created October 1, 2025 13:43
Show Gist options
  • Select an option

  • Save pixeljammed/7e94f90adcca3ebe382173a16b294ea8 to your computer and use it in GitHub Desktop.

Select an option

Save pixeljammed/7e94f90adcca3ebe382173a16b294ea8 to your computer and use it in GitHub Desktop.
code_review
# == 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