index = [(i + 1) for i in range(10)]
slices = sorted(random.sample(list(range(0, len(index))), 2 * n))
[index[start:end] for start, end in zip(slices[::2], slices[1::2])]
Random selection of contiguous elements in an array in Python