def gaps(ranges):
    """Get a list with the size of the gaps between the ranges

    """
    gaps = []
    for cur, nxt in zip(ranges[:-1], ranges[1:]):
        gaps.append(nxt[0] - cur[1])    # 1: end, 0: start
    return gaps