MathGroup Archive 2010

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

Search the Archive

Re: Combining elements of a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108874] Re: Combining elements of a list
  • From: "Christoph Lhotka" <christoph.lhotka at univie.ac.at>
  • Date: Mon, 5 Apr 2010 08:01:19 -0400 (EDT)

Hello,

I already saw many versions, which I like very much, just another one to
demonstrate Mathematica=C2=B4s string manipulation capabilities:

data=={{t,h,i,s},{i,s},{a},{t,e,s,t},{m,e,s,s,a,g,e}}

StringReplace[ToString[data],{" "|","|"{"->"","}"->" "}]//StringTrim

all the best, chr


On Sa, 3.04.2010, 13:09, 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



On Sa, 3.04.2010, 13:09, 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
>
>
>
>
>


--
Mag. Christoph Lhotka
University of Vienna / Institute for Astronomy
Tuerkenschanzstrasse 17, A-1180 Vienna, Austria
fon. +43 (1) 4277 51841
mail. lhotka at astro.univie.ac.at



  • Prev by Date: Re: Intel MKL 10
  • Next by Date: Re: Combining elements of a list
  • Previous by thread: Re: Combining elements of a list
  • Next by thread: Re: Combining elements of a list