I have a list that looks like:
z={{{a,b},{b,c},{c,d},{d,e}},{{b,c},{d,e},{w,e}}}
How would I create a list that looks like:
zz={{a,b,b,c,c,d,d,e},{b,c,d,e,w,e}}
I have tried Flatten but that doesn't seem to work at the desired level.
I have a list that looks like:
z={{{a,b},{b,c},{c,d},{d,e}},{{b,c},{d,e},{w,e}}}
How would I create a list that looks like:
zz={{a,b,b,c,c,d,d,e},{b,c,d,e,w,e}}
I have tried Flatten but that doesn't seem to work at the desired level.
You can tell Flatten to leave level 1 as-is but to flatten levels 2 and 3 together:
Flatten[z, {{1}, {2, 3}}]
(* {{a, b, b, c, c, d, d, e}, {b, c, d, e, w, e}} *)
This syntax is quite flexible, see Flatten command: matrix as second argument.
Try the map function
list = {{{a, b}, {b, c}, {c, d}, {d, e}}, {{b, c}, {d, e}, {w, e}}}
Flatten /@ list