Re: Combining elements of a list
- To: mathgroup at smc.vnet.net
- Subject: [mg108862] Re: Combining elements of a list
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 4 Apr 2010 07:46:34 -0400 (EDT)
StringJoin @@ {"h", "e", "l", "l", "o"} hello expr = Map[ ToString, {{t, h, i, s}, {i, s}, {a}, {t, e, s, t}, {m, e, s, s, a, g, e}}, {2}]; StringJoin @@ Most[Flatten[ Append[#, " "] & /@ expr]] this is a test message Bob Hanlon ---- ebaugh at illinois.edu wrote: ============= How could I go from: {h,e,l,l,o} to {hello}? That is the first step of what I am really looking to do. Which is to go from: {{t,h,i,s},{i,s},{a},{t,e,s,t},{m,e,s,s,a,g,e}} to "this is a test message" Thanks all, Jason Ebaugh