Help newbie!

Oleg Broytmann phd at phd.pp.ru
Wed Dec 12 02:03:40 EST 2001


On Tue, Dec 11, 2001 at 03:14:35PM +2328, Fernando PИrez wrote:
> No need to import anything:
> new_string = 'hello'.replace('hel','hol')

>>> new_string = 'hello'.replace('hel','hol')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
AttributeError: 'string' object has no attribute 'replace'

   (Python 1.5.2, of course).

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list