def non_overlapping(array):
    '''
    >>> non_overlapping([(1,2), (2,5), (1, 6)])
    [[(1, 2), (2, 5)]]
    >>> non_overlapping([(1,4), (2,5), (3, 6)])
    []
    '''
    total = []

    for i, t in enumerate(array):
        start = t[0]
        end = t[1]
        for tt in array[i+1:] :
            if tt[0] <= end:
                total.append([(start, end), (tt[0], tt[1])])

    return total
dataset/ETHPy150Open bt3gl/Python-and-Algorithms-and-Data-Structures/src/builtin_structures/check_non_overlapping_intervals.py/non_overlapping/swapped operands of `<=`