grouping a flat list of number by range
paddy3118 at netscape.net
Fri Jun 2 09:12:38 CEST 2006
John Machin wrote:
> On 2/06/2006 8:36 AM, Paddy wrote:
> Oh the siren call of every new feature in the language!
> enumerate() just to get a first-time test, and then botch it??
> Read the following; the replacement version uses a simple old-fashioned
> inelegant flag, works with an empty sequence, and doesn't depend on the
> input being sliceable or indexable.
Thanks, un-botchable John. What if the poster doesn't send a null list?
What if the correct result for a null list is "spam"; or an exception?
What if.... ... we toned down the language?
Cheers, Pad. :-)
More information about the Python-list