aima/probability.py
def variable_node(self, var):
        """Return the node for the variable named var.
        >>> burglary.variable_node('Burglary').variable
        'Burglary'"""
        for n in self.nodes:
            if n.variable == var:
                return n
        raise Exception("No such variable: %s" % var)
def variable_node(self, var):
        """Return the node for the variable named var.
        >>> burglary.variable_node('Burglary').variable
        'Burglary'"""
        for n in self.nodes:
            if n.variable == var:
                return n
        raise Exception("No such variable: %s" % var)
def variable_node ( self , var ) : for n in self . nodes : if n . variable == var : return n raise Exception ( "No such variable: %s" % var )
Return the node for the variable named var.
        >>> burglary.variable_node('Burglary').variable
        'Burglary
Return the node for the variable named var . >>> burglary . variable_node ( Burglary ) . variable Burglary