sorting question

Steve Holden sholden at holdenweb.com
Thu Feb 8 01:36:15 CET 2001


"dsavitsk" <dsavitsk at e-coli.net> wrote in message
news:tmlg6.61202$Ch.11526305 at newsrump.sjc.telocity.net...
> i would like to iterate through all possible combinations of the
characters
> in a string, and i am not thinking very clearly about how to approach
this.
> that is, if the initial string is 'bar', i want to print
> ['bar', 'bra', 'abr', 'arb', 'rba', 'rab']
> any hints?
>
> thanks,
> ds
>
Tim Peters was working on something a while ago, see

    http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=558836665

but I'm not sure where it eventually went to live

regards
 Steve
--
Tools, training and technology to help you meet your information needs








More information about the Python-list mailing list