Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Speedy category for Create Intervals by akaka
def create_intervals(data):
return sorted([a for a in zip([x for x in data if x-1 not in data],
[y for y in data if y+1 not in data])])
Oct. 24, 2018