import itertools

def normalitza_pesos(pesos):
    it1, it2 = itertools.tee(pesos)
    s = sum(it1)
    for w in it2:
        yield w / s

