how to append semicolon to a variable

Grant Edwards grante at visi.com
Sat Aug 13 21:15:04 CEST 2005


On 2005-08-13, tiissa <tiissa at nonfree.fr> wrote:
> Grant Edwards wrote:

>> s = ';'.join([couch,price,sdate,city])
>> print s
>
> I'll risk myself with something like:
>
> s = ';'.join([tag.string for tag in [couch,price,sdate,city]])
>
> Of course, from the question I wouldn't have any clue. I just like doing 
> some guessing on problems I know nothing about. ;)
>
>>>p.s. i tried couch = couch + ';'
>>>and then i tried couch = couch + ";"
>> 
>> both of those should have worked fine.
>
> Not really. It seems to me the OP is using BeautifulSoup (or some other 
> SGML parser). In this case, couch and others are not strings but objects.

Seems like a reasonable guess.

> It may also be that strUrl is their parent (but I wouldn't know, how 
> would I?)

Nope. :)

-- 
Grant Edwards                   grante             Yow!  Are you mentally here
                                  at               at Pizza Hut??
                               visi.com            



More information about the Python-list mailing list