def probability_text(variable, evidence={}):
    """Returns the probability text for printing.

    Parameters
    ----------
    variable : str
        The query variable.
    evidence : dict, default {}
        Dictionary of evidence for conditional probability.

    Returns
    -------
    text : str
        Text to print.
    """
    # Enter for non-conditional probabilities
    if not evidence:
        text = "P(" + variable + ")"
    else:
        text = "P(" + variable + " |"
        for e in evidence.items():
            text += " " + str(e[0]) + "=" + str(e[1])
        text += ")"

    return text