Range List with 2 lists

Dear Dynamo Specialists,

I have a question.

How to make this kind of list? (red)

[ [ 1…4 ] , [ 5…8] ]

but wat if the input is different?

Example the input is
First list is 10 and 20
Second list 15 and 25

Range have to be 10…15 and 20…25

Hello
try this

Thanks !!