allergies/allergies.py
def _lst_with_zip(self) -> List[str]:
        """
        This calculates the allergens Tom is allergic to by converting the score, which is limited with a modulu of
        2^(number of allergens), into the a bit string representation.

        The bits are reversed and zipped with the allergens lists and only those matching with a 1 bit are taken into
        consideration.

        Not the most mathy solution, but the one my brain came up with when I realized this is some sort of number to
        bit representation exercise.
        """

        score_mod = self._score % (2**len(self._allergens))
        score_bits = reversed(f"{score_mod:b}")

        return list(allergen for bit, allergen in zip(score_bits, self._allergens) if int(bit))

        This calculates the allergens Tom is allergic to by converting the score, which is limited with a modulu of
        2^(number of allergens), into the a bit string representation.

        The bits are reversed and zipped with the allergens lists and only those matching with a 1 bit are taken into
        consideration.

        Not the most mathy solution, but the one my brain came up with when I realized this is some sort of number to
        bit representation exercise.
        
This calculates the allergens Tom is allergic to by converting the score, which is limited with a modulu of
2^(number of allergens), into the a bit string representation.

The bits are reversed and zipped with the allergens lists and only those matching with a 1 bit are taken into
consideration.

Not the most mathy solution, but the one my brain came up with when I realized this is some sort of number to
bit representation exercise.
This calculates the allergens Tom is allergic to by converting the score which is limited with a modulu of 2^ ( number of allergens ) into the a bit string representation . The bits are reversed and zipped with the allergens lists and only those matching with a 1 bit are taken into consideration . Not the most mathy solution but the one my brain came up with when I realized this is some sort of number to bit representation exercise .
def _lst_with_zip(self) -> List[str]:
        score_mod = self._score % (2**len(self._allergens))
        score_bits = reversed(f"{score_mod:b}")
        return list(allergen for bit, allergen in zip(score_bits, self._allergens) if int(bit))
def _lst_with_zip ( self ) -> List [ str ] : score_mod = self . _score % ( 2 ** len ( self . _allergens ) ) score_bits = reversed ( f"{score_mod:b}" ) return list ( allergen for bit , allergen in zip ( score_bits , self . _allergens ) if int ( bit ) )
This calculates the allergens Tom is allergic to by converting the score, which is limited with a modulu of
2^(number of allergens), into the a bit string representation.
This calculates the allergens Tom is allergic to by converting the score which is limited with a modulu of 2^ ( number of allergens ) into the a bit string representation .
"""
        This calculates the allergens Tom is allergic to by converting the score, which is limited with a modulu of
        2^(number of allergens), into the a bit string representation.

        The bits are reversed and zipped with the allergens lists and only those matching with a 1 bit are taken into
        consideration.

        Not the most mathy solution, but the one my brain came up with when I realized this is some sort of number to
        bit representation exercise.
        """
self