string goes away
Duncan Booth
duncan.booth at invalid.invalid
Mon Apr 4 03:31:21 EDT 2005
John J. Lee wrote:
> Duncan Booth <duncan.booth at invalid.invalid> writes:
> [...]
>> str.join(sep, list_of_str)
> [...]
>
> Doesn't work with unicode, IIRC.
>
>
str.join won't work if sep is unicode, but generally you know what type the
separator is and str.join will quite happily join a list of strings where
one or more is unicode and return a unicode result.
If you know the separator is unicode then use unicode.join instead.
More information about the Python-list
mailing list