On Aug 4, 3:22 pm, Anthony Tolle <anthony.to...@gmail.com> wrote:
> On Aug 4, 9:10 am, BobAalsma <bob.aal...@aalsmacons.nl> 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 retun value of the method in an assignment, like
> so:
>
> bestandsnaam_nieuw = bestandsnaam.replace(KLANTNAAM_OUT,KLANTNAAM_IN)
>
> This will not change the value of bestandsnaam

YESS!

Thanks, this is what I wanted to achieve but could not find

Regards,
Bob
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to