def argmaxWithVal(l, f):
    """
    @param l: C{List} of items
    @param f: C{Procedure} that maps an item into a numeric score
    @returns: the element of C{l} that has the highest score and the score
    """
    best = l[0]; bestScore = f(best)
    for x in l:
        xScore = f(x)
        if bestScore > xScore:
            best, bestScore = x, xScore
    return (best, bestScore)
dataset/ETHPy150Open rll/lfd/lfd/rapprentice/util.py/argmaxWithVal/swapped operands of `>`