Re: more elements in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg32269] Re: [mg32241] more elements in a list
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Wed, 9 Jan 2002 23:37:27 -0500 (EST)
- Organization: JEOL (USA) Ltd.
- References: <200201090817.DAA23662@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
merkat wrote: > Hi , > > How do I multiply the number of elements in a list? > I have the lists: > {a,b,c} and > {2,5,4} > > the result should be: > {a,a,b,b,b,b,b,c,c,c,c} > > Merkat You could use mult[a_,b_]:=Flatten[Table[#[[1]],{#[[2]]}]&/@Transpose[{a,b}]] Ssezi
- References:
- more elements in a list
- From: merkat <cabanc@hotmail.com>
- more elements in a list