Data distribution by frequency
William Park
parkw at better.net
Sun Oct 8 01:07:08 EDT 2000
On Sat, Oct 07, 2000 at 11:45:58PM +0000, Greg Fortune wrote:
> Obj1
> Frequency: 2
> Obj2
> Frequency:2
>
> should yeild
> [Obj1, Obj2, Obj1, Obj2]
> Obj1
> Frequency: 3
> Obj2
> Frequency: 2
> Obj3
> Frequency: 1
> Obj4
> Frequency: 2
>
> Should yield
> [Obj1, Obj2, Obj4, Obj1, Obj3, Obj2, Obj1, Obj4]
Getting correct number of entries is no-brainer,
[Obj1] * Frequecy1 + [Obj2] * Frequency2 + ...
But, how are the items distributed in the list?
---William Park, Open Geometry Consulting
More information about the Python-list
mailing list