Gerard Flanagan wrote:
> On Mar 9, 4:17 pm, "cesco" <[EMAIL PROTECTED]> wrote:
>> On Mar 9, 3:51 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote:
>>
>>> "cesco" <[EMAIL PROTECTED]> writes:
>>>> I have to generate a list of N random numbers (integer) whose sum is
>>>> equal to M. If, for example, I have to generate 5 random numbers whose
>>>> sum is 50 a possible solution could be [3, 11, 7, 22, 7].
>
> Suppose you have a fixed telegraph pole at N and a fixed telgraph pole
> at M, and you're given 5 more telegraph poles...
>
That's a good one! Three-liner.
Cheers, Mel.
--
http://mail.python.org/mailman/listinfo/python-list