Substitute for join()
Daniel Klein
DanielK at jBASE.com
Wed Mar 21 15:30:22 EST 2001
Thanks everyone for your public and private answers. This is the greatest
bunch of folks I have ever had the pleasure of being a part of!
I have indeed recoded to use string.join().
Again thanks,
Dan
"Daniel Klein" <DanielK at jBASE.com> wrote in message
news:Mo7u6.58$Hp.2896 at typhoon.aracnet.com...
> I've got to make a script (written in version 2.0) to work on a machine
> running 1.5.2. The only incompatible line is one that uses the
> "".join(mylist) method. To 'get out of the woods' quickly, I substituted
it
> with
>
> s = ''
> for element in mylist: s = s + element
>
> Is this the most efficient way to code this?
>
> Thanks,
> Daniel Klein
>
>
More information about the Python-list
mailing list