yaffa wrote:
> dear folks,
Dear Yaffa,
> i'm trying to append a semicolon to my addr string
Python strings don't have a 'append' method.
> and am using the
> syntax below. for some reason the added on of the ; doesn't work.
"doesn't work" is the worst possible description of a problem.
Pleas
has an "append" method). You can use "print addr" or "print repr(addr)"
to determine that.
> - Original Message - From: "Qiangning Hong" <[EMAIL PROTECTED]>
> To: "yaffa" <[EMAIL PROTECTED]>
> Cc:
> Sent: Friday,
On 12 Aug 2005 09:31:08 -0700
"yaffa" <[EMAIL PROTECTED]> wrote:
> addr = incident.findNextSibling('td')
> addr.append('%s;')
addr += ';'
or
addr2 = '%s;' % addr
Strings, being immutable, do not support appending like lists do. Also,
the %whatever specifiers are only in effect when used with t
yaffa wrote:
> dear folks,
>
> i'm trying to append a semicolon to my addr string and am using the
> syntax below. for some reason the added on of the ; doesn't work.
> when i print it out later on it only shows the original value of addr.
>
> addr = incident.findNextSibling('td')
> addr.append(
dear folks,
i'm trying to append a semicolon to my addr string and am using the
syntax below. for some reason the added on of the ; doesn't work.
when i print it out later on it only shows the original value of addr.
addr = incident.findNextSibling('td')
addr.append('%s;')
thanks
yaffa
--
ht