List to string? Docstrings?
Hrvoje Niksic
hniksic at srce.hr
Tue Sep 14 09:05:36 EDT 1999
Skip Montanaro <skip at mojam.com> writes:
> François> import operator
> François> text = reduce(operator.concat, chars)
>
> The normal idiom for smashing a list into a string is
>
> import string
> text = string.join(chars, "")
>
> but your method is just as effective.
I thought the `reduce' thing was supposed to be very slow? Or at
least that's what I remember reading here.
More information about the Python-list
mailing list