Merge branch

Hi,

I know this is a beginner’s problem:
What is the command to flatten a branch in a list? If I flatten, it would flatten the whole tree, but I want to combine all (0,x) and (1,x) but in the same list

Thank you!

Shift Paths