Re: How to remove the Null character in a Table?
- To: mathgroup at smc.vnet.net
- Subject: [mg124361] Re: How to remove the Null character in a Table?
- From: "andre.robin3" <andre.robin3 at wanadoo.fr>
- Date: Tue, 17 Jan 2012 03:34:14 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jf13je$5ln$1@smc.vnet.net>
Table[If[i < 3, i,], {i, 5}] // DeleteCases[#, Null] & ---> {1,2} Or : Table[If[i < 3, i,], {i, 5}] /. Null -> Sequence[] ---> {1,2} "Rex" <aoirex at gmail.com> a écrit dans le message de news: jf13je$5ln$1 at smc.vnet.net... > For example, > > Table[If[i < 3, i,], {i, 5}] > will give > {1, 2, Null, Null, Null} > > But I want the result to be {1,2}. > > Any trick for this? >