def data_string_compare(db_data, user_data):
        """Validate string removing all white space before comparison.

        Args:
            db_data (str): The data store in Redis.
            user_data (str): The user provided data.

        Returns:
            bool: True if the data passed validation.
        """
        db_data = ''.join(db_data.split())
        user_data = ''.join(user_data.split())
        if operator.eq(db_data, user_data):
            return True
        return False
def data_string_compare ( db_data , user_data ) : db_data = '' . join ( db_data . split ( ) ) user_data = '' . join ( user_data . split ( ) ) if operator . eq ( db_data , user_data ) : return True return False
Validate string removing all white space before comparison.

        Args:
            db_data (str): The data store in Redis.
            user_data (str): The user provided data.

        Returns:
            bool: True if the data passed validation.