need help with my append syntax

bruno modulix onurb at xiludom.gro
Sat Aug 13 11:39:59 EDT 2005


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.
Please read
http://www.catb.org/~esr/faqs/smart-questions.html



> when i print it out later on it only shows the original value of addr.
> 
> addr = incident.findNextSibling('td')
> addr.append('%s;')

If you don't have an AttributeError here then addr is not bound to a string.

> thanks
> 
> yaffa
> 


-- 
bruno desthuilliers
ruby -e "print 'onurb at xiludom.gro'.split('@').collect{|p|
p.split('.').collect{|w| w.reverse}.join('.')}.join('@')"
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list