Quiz question 8 for strings

I am not able to understand the logic behind the correct answer.

Please guide.

Hello @Charu510, you eliminated the space in between the coding blocks. And we need to maintain the space between the last two coding blocks word as well.
I hope it is clear to you, pls feel free to ask in case of any doubt or issue.
If it is clear then pls mark it as resolve and feel free to provide the rating.
Thanks :slight_smile:

So here the argument 2 in a.replace() means we have to replace the first 2 occurrences of ‘coding’ with ‘CODING’ right?

yes, we need to do that.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.