list manipulation
John Machin
sjmachin at lexicon.net
Tue Apr 22 18:12:03 EDT 2008
Mike Driscoll wrote:
> Well you could always do something like this:
>
> output = ';'.join(roadList)
>
> Which will put single quotes on the ends.
No, it doesn't. You are conflating foo and repr(foo).
I suppose if you want to be
> silly, you could do this:
>
> output = '"%s"' % ';'.join(roadList)
*IF* your first effort were to put single quotes on the ends
('the-text') then your second effort would certainly produce something
silly ... either '"the-text"' or "'the-text'" depending on which of the
assignment or the join method you imagined was producing the single quotes.
More information about the Python-list
mailing list