def combine_range(lines, start, end):
 ((srow, scol), (erow, ecol)) = (start, end)
 if (srow == erow):
  return (lines[(srow - 1)][scol:ecol], end)
 rows = (([lines[(srow - 1)][scol:]] + lines[srow:(erow - 1)]) + [lines[(erow - 1)][:ecol]])
 return (''.join(rows), end)

def combine_range ( lines , start , end ) : ( ( srow , scol ) , ( erow , ecol ) ) = ( start , end ) if ( srow == erow ) : return ( lines [ ( srow - 1 ) ] [ scol : ecol ] , end ) rows = ( ( [ lines [ ( srow - 1 ) ] [ scol : ] ] + lines [ srow : ( erow - 1 ) ] ) + [ lines [ ( erow - 1 ) ] [ : ecol ] ] ) return ( '' . join ( rows ) , end )
join content from a range of lines between start and end .