MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Something like Flatten


If I understand your intent, the last expression is what you want:

theList = { {{1}, {2}, {3}}, {{4}, {5}, {6}}, {{7}, {8}, {9}} };

Flatten[theList]

{1,2,3,4,5,6,7,8,9}

Flatten[theList, 1]

{{1},{2},{3},{4},{5},{6},{7},{8},{9}}

Map[Flatten, theList]

{{1,2,3},{4,5,6},{7,8,9}}


Bob Hanlon


  • Prev by Date: Re: Integer Values
  • Next by Date: Re: Combining Lists?
  • Previous by thread: Something like Flatten
  • Next by thread: Re: Something like Flatten