def prob(factor, *entry):
    """
    argument
    `factor`, a dictionary of domain and probability values,
    `entry`, a list of values, one for each variable in the same order as specified in the factor domain.

    Returns p(entry)
    """

    return factor['table'][entry]