Re: Need a strange sort method...
"SpreadTooT hin" <bjobrien62@gma il.comwrites:
>
I think my loop termination is incorrect...
It looks wrong to me; try your loop on range(20) and see what happens.
You should make exactly 3 passes. You might also want to use
list.extend rather than adding lists. Finally, your function modifies
its input list (by sorting it), which generally is not nice unless the
caller expects it and wants it. You can save the caller some trouble
by making a sorted copy to work from.
"SpreadTooT hin" <bjobrien62@gma il.comwrites:
I have one extra 10 that I shouldn't...
I think my loop termination is incorrect...
maybe I should just stop when my new series size is the same size as
the original?
the original?
list.extend rather than adding lists. Finally, your function modifies
its input list (by sorting it), which generally is not nice unless the
caller expects it and wants it. You can save the caller some trouble
by making a sorted copy to work from.
Comment