print('How many calls to sum()?')
print([(r / psum(raw)) for r in raw])
print('\nAnd now?')
s = psum(raw)
print([(r / s) for r in raw])
print('\nAnd now?')
print([(r / s) for s in [psum(raw)] for r in raw])
Нормализация списка чисел в Python