Help newbie!

Oleg Broytmann phd at phd.pp.ru
Tue Dec 11 22:35:21 CET 2001


On Tue, Dec 11, 2001 at 10:17:35PM +0100, Johan Barelds wrote:
> >>> replace("hello","hel","hol")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> NameError: name 'replace' is not defined
> ========================================================================
> What do i have to do to get the command "replace" working?

   Either "from string import replace", or

import string
string.replace(...

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