This may be a repetitive topic but I have a different problem on this topic and the existing answers didn't help me.  

I want to generate some random values from the uniform distribution over (0,1) in my python application and normalizing the sum to equal one.   

The problem is that the sum of generated values is not exactly equal to one. On each group of normalized random values, the sum for example equals to `0.99999999999` or `1.00000000056`. I have tried some tricks but couldn't solve the issue. This is what I have done so far:

```
sum = 0
probs = []
for i in range(10):
    probs += [random.uniform(0, 1)]

prob = np.array(probs)

for p in prob:
 p /= prob.sum()  # normalize
 sum += p

print(sum)

```

Does anyone know how to generate these numbers so that their sum equals exactly 1?