def normalizeFreqs(D):
    if not D:
        return D
    s = 0
    #take the sum of all frequencies in D
    for k in D:
        s = s + D[k][0]
    # divide each frequency by the sum
    for k in D:
        D[k] = (float(s)/D[k][0],normalizeFreqs(D[k][1]),normalizeFreqs(D[k][2]))
    return D

# prints all the info about a word in D
dataset/ETHPy150Open jbrew/pt-write/pt-write.py/normalizeFreqs/swapped operands of `/`