Re: Fastest way to calculate leading whitespace

2010-05-08 Thread Daniel Skinner
sorry, my mistake it runs faster (looking at the wrong line of code). But the first two solutions are still faster. On Sat, May 8, 2010 at 12:48 PM, Daniel Skinner wrote: > That solution actually runs slower then the generator method. > > > On Sat, May 8, 2010 at 12:33 PM, Sh

Re: Fastest way to calculate leading whitespace

2010-05-08 Thread Daniel Skinner
That solution actually runs slower then the generator method. On Sat, May 8, 2010 at 12:33 PM, Shashank Singh < shashank.sunny.si...@gmail.com> wrote: > > > On Sat, May 8, 2010 at 10:49 PM, dasacc22 wrote: > >> Hi >> >> This is a simple question. I'm looking for the fastest way to >> calculate t

Re: rearrange text

2005-03-02 Thread Daniel Skinner
ah thanks I couldn't figure out how to join it up very appropriately, had this loop ... yeeeaah .. :) Thanks for both comments -- http://mail.python.org/mailman/listinfo/python-list

rearrange text

2005-03-02 Thread Daniel Skinner
If I have the following text var = '1,2,3,4' and I want to use the comma as a field delimeter and rearrange the fields to read '1,3,2,4' How would I accomplish this in python? -- http://mail.python.org/mailman/listinfo/python-list