def check_assignments(csp, var1, var2) :
    """Check if all constraints between var1 and var2 are satisfied for the
    given assignment values"""
    return all(constraint.check(var1[1], var2[1]) for constraint in csp.constraints_between(var1[0], var2[0]))