Also,
for bestandsnaam in dirs and files:
is probably not doing what you want. Use + to concatenate lists.
Daniel
On Wed, Aug 4, 2010 at 6:30 AM, Mike Kent wrote:
> On Aug 4, 9:10 am, BobAalsma wrote:
> > I'm working on a set of scripts and I can't get a replace to work in
>
On Aug 4, 9:10 am, BobAalsma wrote:
> I'm working on a set of scripts and I can't get a replace to work in
> the script - please help.
> bestandsnaam_nieuw.replace(KLANTNAAM_OUT,KLANTNAAM_IN)
I'm not sure what you are intending to do here, but string.replace
does not do i
On Aug 4, 3:22 pm, Anthony Tolle wrote:
> On Aug 4, 9:10 am, BobAalsma wrote:
>
> > #
> > bestandsnaam_nieuw = bestandsnaam
> >
> > bestandsnaam_nieuw.replace(KLANTNAAM_OUT,KLANTNAAM_IN)
>
> The replace method does not modif
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.repl
On Aug 4, 9:10 am, BobAalsma wrote:
> #
> bestandsnaam_nieuw = bestandsnaam
> bestandsnaam_nieuw.replace(KLANTNAAM_OUT,KLANTNAAM_IN)
The replace method does not modify the string (strings are immutable).
You need to use the