List to string? Docstrings?
Fredrik Lundh
fredrik at pythonware.com
Tue Sep 14 01:54:08 EDT 1999
François Pinard <pinard at iro.umontreal.ca> wrote:
> 1) For converting a string into a list, I used:
>
> chars = list(text)
>
> For getting back the string from the list, I tried:
>
> import operator
> text = reduce(operator.concat, chars)
>
> but still, I wonder if you would not have a better suggestion.
Guido has written an essay on this topic:
http://www.python.org/doc/essays/list2str.html
</F>
More information about the Python-list
mailing list