I didn't suggest changing the indentation. You need to store value of c (changed or not) while iterating over s and then construct new string and return it.
and one more advise - the sooner you get rid of habit using single letter cryptic variable names - the better.
and one more advise - the sooner you get rid of habit using single letter cryptic variable names - the better.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs