# Removing outer brackets from list of data [closed]

I have a data list like below:

data = {{{-13.236, 25.903, 13.937}, {-22.42, -10.451, 24.981},
{-2.877, -11.507, 33.117}, {6.905, -4.385, 39.751},
{1.81, -22.179, 21.071}, {-16.151, -12.976, 25.321}}}


From here I want to make

data = {{-13.236, 25.903, 13.937}, {-22.42, -10.451, 24.981},
{-2.877, -11.507, 33.117}, {6.905, -4.385, 39.751},
{1.81, -22.179, 21.071}, {-16.151, -12.976, 25.321}}


How to do that?

Use First[data] or data[[1]] or Sequence @@ data.

Update: Additional Identity @@ data

• @Pavel..Thanks, First[data] or data[[1]] works fine but getting problem with Sequence @@ data...any comments? Maybe Sequence @@@ data works. – Bikash Jun 9 '18 at 14:03
• Of course, Sequence@@data will be useful only in list context, i.e. {a,Sequence@@data, b} that replace data list by sequence of elements. Header Sequence remains on upper level (but First@data == Sequence @@ data). Sequence@@@data replace each inner List in outer List (remove {} of next level) that is not the same. – Pavel Smirnov Jun 9 '18 at 15:26

Another option is Flatten, which is specifically designed for this problem. Thus:

Flatten[data,1]


{{-13.236, 25.903, 13.937}, {-22.42, -10.451, 24.981}, {-2.877, -11.507, 33.117}, {6.905, -4.385, 39.751}, {1.81, -22.179, 21.071}, {-16.151, -12.976, 25.321}}

and:

Flatten[data]


{-13.236, 25.903, 13.937, -22.42, -10.451, 24.981, -2.877, -11.507, 33.117, 6.905, -4.385, 39.751, 1.81, -22.179, 21.071, -16.151, -12.976, 25.321}