Is a merge interval function available?
Nobody
nobody at nowhere.com
Thu Feb 11 20:37:59 EST 2010
More information about the Python-list mailing list
Thu Feb 11 20:37:59 EST 2010
- Previous message (by thread): Is a merge interval function available?
- Next message (by thread): Is a merge interval function available?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 10 Feb 2010 23:03:29 -0500, Steve Holden wrote: >> intervals = sorted(intervals, key = lambda x: x[0]) > > Since Python uses lexical sorting and the intervals are lists isn't the > key specification redundant here? Yes, but I wanted to make it explicit. Well, omitting the key= would change the sorting order in the event that multiple intervals have the same start, but it still won't affect the result of the function overall.
- Previous message (by thread): Is a merge interval function available?
- Next message (by thread): Is a merge interval function available?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list