BobAalsma wrote:

Although [it] may not be obvious at first unless you're Dutch...

> bestandsnaam_nieuw = bestandsnaam
> bestandsnaam_nieuw.replace(KLANTNAAM_OUT,KLANTNAAM_IN)

str.replace() does not modify a string, it creates a new one.

This doesn't work:
 
>>> s = "that's all folks"
>>> s.replace("all", "nothing")
"that's nothing folks"
>>> s
"that's all folks"

But this does:

>>> old = "that's all folks"
>>> new = old.replace("all", "nothing")
>>> new
"that's nothing folks"

Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to