Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
chain from iterable solution in Clear category for Expand Intervals by rodka81
from itertools import chain
def expand_intervals(items):
return chain.from_iterable(range(start, stop+1) for start, stop in items)
Dec. 21, 2018
Comments: