count the number of sub-list in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg122233] count the number of sub-list in a list
- From: Gy Peng <hitphyopt at gmail.com>
- Date: Fri, 21 Oct 2011 07:28:15 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Dear All, I have a list like: {{{{-0.00201671, 0.87571, 0.482832}, {-0.839678, 0.260735, -0.476401}, {-0.543081, -0.406384, 0.734789}}, {{-0.87571, -0.00201671, 0.482832}, {-0.260735, -0.839678, -0.476401}, {0.406384, -0.543081, 0.734789}}, {{0.00201671, -0.87571, 0.482832}, {0.839678, -0.260735, -0.476401}, {0.543081, 0.406384, 0.734789}}, {{0.87571, 0.00201671, 0.482832}, {0.260735, 0.839678, -0.476401}, {-0.406384, 0.543081, 0.734789}}}, {{{0.839678, -0.260735, 0.476401}, {-0.00201671, 0.87571, 0.482832}, {-0.543081, -0.406384, 0.734789}}, {{0.260735, 0.839678, 0.476401}, {-0.87571, -0.00201671, 0.482832}, {0.406384, -0.543081, 0.734789}}, {{-0.839678, 0.260735, 0.476401}, {0.00201671, -0.87571, 0.482832}, {0.543081, 0.406384, 0.734789}}, {{-0.260735, -0.839678, 0.476401}, {0.87571, 0.00201671, 0.482832}, {-0.406384, 0.543081, 0.734789}}}, {{{0.00201671, -0.87571, -0.482832}, {0.839678, -0.260735, 0.476401}, {-0.543081, -0.406384, 0.734789}}, {{0.87571, 0.00201671, -0.482832}, {0.260735, 0.839678, 0.476401}, {0.406384, -0.543081, 0.734789}}, {{-0.00201671, 0.87571, -0.482832}, {-0.839678, 0.260735, 0.476401}, {0.543081, 0.406384, 0.734789}}, {{-0.87571, -0.00201671, -0.482832}, {-0.260735, -0.839678, 0.476401}, {-0.406384, 0.543081, 0.734789}}}, {{{-0.839678, 0.260735, -0.476401}, {0.00201671, -0.87571, -0.482832}, {-0.543081, -0.406384, 0.734789}}, {{-0.260735, -0.839678, -0.476401}, {0.87571, 0.00201671, -0.482832}, {0.406384, -0.543081, 0.734789}}, {{0.839678, -0.260735, -0.476401}, {-0.00201671, 0.87571, -0.482832}, {0.543081, 0.406384, 0.734789}}, {{0.260735, 0.839678, -0.476401}, {-0.87571, -0.00201671, -0.482832}, {-0.406384, 0.543081, 0.734789}}}} I consider each of {{*, *, *}, {*, *, *}, {*,*,*}} is one single element, so how could I count how many element in the whole list? Thank you very much! G
- Follow-Ups:
- Re: count the number of sub-list in a list
- From: DrMajorBob <btreat1@austin.rr.com>
- Re: count the number of sub-list in a list
- From: Patrick Scheibe <pscheibe@trm.uni-leipzig.de>
- Re: count the number of sub-list in a list
- From: Heike Gramberg <heike.gramberg@gmail.com>
- Re: count the number of sub-list in a list