alchemist/laboratory.py
def can_react(self, substance1, substance2):
        """Checks if two substances can react with eachother

        Two substances, substance1 and substance2 are able to react if they
        are such they are the anti-substances of each other. What this means
        is that either the string of substance1 is the concatenation of 'anti'
        and the string of subtance2 or the other way around.

        :param substance1: string specifying a substance
        :param substance2: string specifying another substance

        :return: boolean specifying if the two substances can react or not
        """
        if not isinstance(substance1, str) or not isinstance(substance2, str):
            raise TypeError("The passed substances need to be strings.")
        return (substance1 == "anti" + substance2) or (
            substance2 == "anti" + substance1
        )
Checks if two substances can react with eachother

        Two substances, substance1 and substance2 are able to react if they
        are such they are the anti-substances of each other. What this means
        is that either the string of substance1 is the concatenation of 'anti'
        and the string of subtance2 or the other way around.

        :param substance1: string specifying a substance
        :param substance2: string specifying another substance

        :return: boolean specifying if the two substances can react or not
        
Checks if two substances can react with eachother
Two substances, substance1 and substance2 are able to react if they
are such they are the anti-substances of each other. What this means
is that either the string of substance1 is the concatenation of 'anti'
and the string of subtance2 or the other way around.
Checks if two substances can react with eachother Two substances substance1 and substance2 are able to react if they are such they are the anti - substances of each other . What this means is that either the string of substance1 is the concatenation of ' anti ' and the string of subtance2 or the other way around .
def can_react(self, substance1, substance2):
        if not isinstance(substance1, str) or not isinstance(substance2, str):
            raise TypeError("The passed substances need to be strings.")
        return (substance1 == "anti" + substance2) or (
            substance2 == "anti" + substance1
        )
def can_react ( self , substance1 , substance2 ) : if not isinstance ( substance1 , str ) or not isinstance ( substance2 , str ) : raise TypeError ( "The passed substances need to be strings." ) return ( substance1 == "anti" + substance2 ) or ( substance2 == "anti" + substance1 )
Checks if two substances can react with eachother
Two substances, substance1 and substance2 are able to react if they
are such they are the anti-substances of each other.
Checks if two substances can react with eachother Two substances substance1 and substance2 are able to react if they are such they are the anti - substances of each other .
"""Checks if two substances can react with eachother

        Two substances, substance1 and substance2 are able to react if they
        are such they are the anti-substances of each other. What this means
        is that either the string of substance1 is the concatenation of 'anti'
        and the string of subtance2 or the other way around.

        :param substance1: string specifying a substance
        :param substance2: string specifying another substance

        :return: boolean specifying if the two substances can react or not
        """
boolean specifying if the two substances can react or not
boolean specifying if the two substances can react or not
self
substance1
string specifying a substance
string specifying a substance
substance2
string specifying another substance
string specifying another substance