Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: NthPermutation: how to change output format?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49836] Re: NthPermutation: how to change output format?
  • From: "Peltio" <peltio at twilight.zone>
  • Date: Tue, 3 Aug 2004 01:11:08 -0400 (EDT)
  • References: <cejsat$cpo$1@smc.vnet.net>
  • Reply-to: "Peltio" <peltioNOSP at Mdespammed.com.invalid>
  • Sender: owner-wri-mathgroup at wolfram.com

"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?