Python Replace part of a String

So I want to replace a certain part of a string.
I tried string.replace() Method but it doesn´t seem to work in bge.
Is there another way of doing it?

Hello! replace method doesn’t modify the initial string. It seems you need to use a second variable to store the result of str.replace(…):

http://www.pasteall.org/blend/36109

Thanks! You´re a life saver!!!

Or you can use format() That seems more powerful to me.

I think format() belongs to the string mini-language rather than for general search/replace.

Sure, but it might be better to plan the project to use format() + a format dictionary rather than doing search and replace.

Replacing worked for me, but I´ll keep format() in mind.