Grey Alien #1 Replace is a function that returns a strin. The way you've called it, the return result is not used.Try this:num = replace(num, "1", "0")