Python: problem of hackerearth

sir this is the question

and this is my answer

sir what is the mistake in my code

@qudsiya

  1. print function will print all the characters in a new line. The output should be in a single line without spaces
  2. You will be given a STRING, you’ve to iterate through all the characters and make changes.

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.