MathGroup Archive 2004

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

Search the Archive

Re: NthPermutation: how to change output format?


"BV" wrote:

>    {a, b, 2, c, 3, e, d, 1}
>How do I get directly:
>    ab2c3ed1
>without commas and parentheses?

If you want a string use this

    crunch[res_List]:=StringJoin[ToString/@res]

But if you want a symbol, use this instead

    crunch[res_List]:=ToExpression[StringJoin[ToString/@res]]

crunch[{a, b, 2, c, 3, e, d, 1}]
     ab2c3ed1


cheers,
Peltio
Invalid address in reply-to. Crafty demunging required to mail me.


  • Prev by Date: Failure to Evaluate?
  • Next by Date: Re: NthPermutation: how to change output format?
  • Previous by thread: NthPermutation: how to change output format?
  • Next by thread: Re: NthPermutation: how to change output format?