I come to praise .join, not to bury it...

Terry Reedy tjreedy at udel.edu
Wed Mar 7 19:19:07 EST 2001


"Steve Williams" <stevewilliams at wwc.com> wrote in message
news:3AA6B157.2B62BFA5 at wwc.com...
> > Continuing on into the darkness:
>
> ten = +.join(1,2,3,4)
>
> and
>
> sixfactorial = *.join(range(1,7))

We already have reduce and operator.x for these.

join:string::reduce:number -- almost

I believe that ''.join(str_list) == reduce(operator.add, str_list).

TJ Reedy






More information about the Python-list mailing list