converting an array of chars to a string
Michael Hudson
mwh at python.net
Tue Jul 2 10:39:40 EDT 2002
Jim Richardson <warlock at eskimo.com> writes:
> On Fri, 21 Jun 2002 08:22:02 GMT,
> Derek Thomson <derek at wedgetail.com> wrote:
> > Easy, just use the "join" function to concatenate a sequence of strings
> > into a single string. For example:
> >
> >
> > import string
> >
> > list = ['a', 'b', 'c', 'd']
> >
> > s = string.join(list, '')
> >
> > print s
[...]
> huh!
>
> cool, thanks, that solved a problem I was having.
> <muttter> when did that show up? or was I not paying attention?</mutter>
What, string.join? It's been around forever, or as good as.
Cheers,
M.
--
That one is easily explained away as massively intricate
conspiracy, though. -- Chris Klein, alt.sysadmin.recovery
More information about the Python-list
mailing list