def sort_genomic_ranges ( rngs ) : return sorted ( rngs , key = lambda x : ( x . chr , x . start , x . end ) )
how to use the range function in descending order python
sort multiple ranges
def sort_genomic_ranges(rngs):
  """sort multiple ranges"""
  return sorted(rngs, key=lambda x: (x.chr, x.start, x.end))