MathGroup Archive 2011

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

Search the Archive

Re: How can I concatenate elements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119854] Re: How can I concatenate elements
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 26 Jun 2011 06:25:12 -0400 (EDT)

On 6/25/11 at 5:28 AM, leandrotenfen at hotmail.com (Leandro Tenfen)
wrote:

>I have two lists:

>s1={1,2,3,4,5,6}; s2={c,k};

>How can I concatenate elements of lists as follows:

>s3={1c,2c,3c,4c,5c,6c,1k,2k,3k,4k,5k,6k}

In[6]:= s3 = Flatten[# s1 & /@ s2]

Out[6]= {c,2 c,3 c,4 c,5 c,6 c,k,2 k,3 k,4 k,5 k,6 k}



  • Prev by Date: Re: How can I concatenate elements
  • Next by Date: generating the netimage of a geodesic shape?
  • Previous by thread: Re: How can I concatenate elements
  • Next by thread: Re: How can I concatenate elements