<filename>user.py
class user():
    """
    Class that generates new instances of contacts.
    """

    User_list = [] # Empty contact list

    def __init__(self,username,password):

      # docstring removed for simplicity

        self.first_name= username
        self.password= password
        
# Init method up here
    def save_user(self):

        '''
        save_user method saves user objects into user_list
        '''

        user.User_list.append(self)
    
     
    def delete_user(self):

        '''
        delete_user method deletes a saved user from the User_list
        '''

        user.User_list.remove(self)
         
    @classmethod
    def find_by_password(cls,number):
        '''
        Method that takes in a password and returns a user that matches that password.

        Args:
            number: password to search for
        Returns :
            user of person that matches the password.
        '''

        for user in cls.User_list:
            if user.password == number:
                return user
    @classmethod
    def user_exist(cls,number):
        '''
        Method that checks if a user exists from the user list.
        Args:
            number: Password to search if it exists
        Returns :
            Boolean: True or false depending if the user exists
        '''
        for user in cls.User_list:
            if user.password == number:
                    return True

        return False
    
    @classmethod
    def display_users(cls):
        '''
        method that returns the User list
        '''
        return cls.User_list
    
    
    
     
<filename>user.py
class user():
    """
    Class that generates new instances of contacts.
    """

    User_list = [] # Empty contact list

    def __init__(self,username,password):

      # docstring removed for simplicity

        self.first_name= username
        self.password= password
        
# Init method up here
    def save_user(self):

        '''
        save_user method saves user objects into user_list
        '''

        user.User_list.append(self)
    
     
    def delete_user(self):

        '''
        delete_user method deletes a saved user from the User_list
        '''

        user.User_list.remove(self)
         
    @classmethod
    def find_by_password(cls,number):
        '''
        Method that takes in a password and returns a user that matches that password.

        Args:
            number: password to search for
        Returns :
            user of person that matches the password.
        '''

        for user in cls.User_list:
            if user.password == number:
                return user
    @classmethod
    def user_exist(cls,number):
        '''
        Method that checks if a user exists from the user list.
        Args:
            number: Password to search if it exists
        Returns :
            Boolean: True or false depending if the user exists
        '''
        for user in cls.User_list:
            if user.password == number:
                    return True

        return False
    
    @classmethod
    def display_users(cls):
        '''
        method that returns the User list
        '''
        return cls.User_list
    
    
    
     
Class that generates new instances of contacts. # Empty contact list # docstring removed for simplicity # Init method up here save_user method saves user objects into user_list delete_user method deletes a saved user from the User_list Method that takes in a password and returns a user that matches that password.          Args:             number: password to search for         Returns :             user of person that matches the password. Method that checks if a user exists from the user list.         Args:             number: Password to search if it exists         Returns :             Boolean: True or false depending if the user exists method that returns the User list