On Tue, Apr 22, 2008 at 4:55 PM, DataSmash <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  I have a list that looks like this:
>  roadList = ["Motorways","Local","Arterial"]
>
>  I want to apply some code so that the output looks like this:
>  "Motorways;Local;Arterial"
>  How can this be done with the LEAST amount of code?

Not sure if it's LEAST amount of code, or the best, but it works.

>>> li = ["Motorways","Local","Arterial"]
>>> '\"%s\"' % (''.join(['%s;' % (x,) for x in li]),)
'"Motorways;Local;Arterial;"'
>>>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to