Re: List Partition
- To: mathgroup at smc.vnet.net
- Subject: [mg54139] Re: List Partition
- From: Erich Neuwirth <erich.neuwirth at univie.ac.at>
- Date: Fri, 11 Feb 2005 03:34:22 -0500 (EST)
- References: <ctqe1f$sf7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
a = {"cat", "E", "in", "the", "hat", "E", "okay", "fine", "E"};
Select[Split[a, #1 != "E" && #2 != "E" &], # â? {"E"} &]
zak wrote:
> what could i do to partition the list:
> a={cat,E,in,the,hat,E,okay,fine,E}
> into
> a={{cat},{{in},{the},{hat}},{{okay},{fine}}}
>
> ie: every word in a sublist , and E determine the end of a sentence
> (a bigger list).
> zak
>