Best way to merge/sort two sorted lists?...
Raymond Hettinger
python at rcn.com
Thu Dec 6 14:01:03 EST 2007
On Dec 6, 9:30 am, Aaron Watters <aaron.watt... at gmail.com> wrote:
> While trying to optimize some NUCULAR libraries I discovered
> that the best way to merge 2 sorted lists together
> into a new sorted list is to just append
> them and re-sort.
. . .
> I'm beginning to think
> a "sorted list merger" might make a nice tiny extension module
> (at least for my purposes).
See recipes:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/491285
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305269
Raymond
More information about the Python-list
mailing list