Light Mode
Dark Mode
caps_lock right result in extra test #2

I would like to give some feedback about ... From: https://py.checkio.org/mission/caps-lock/solve/

Please check the task named "caps_lock" placed in https://py.checkio.org/station/scientific-expedition/

My question is about result, what i get in extra test #2. My solution:

          def caps_lock(text):
            text = text.split('a')
            for part in text[1::2]:
                i = text.index(part)
                text[i] = text[i].swapcase()
            return ''.join(text)

.. gives me reult "MDDER THn MD bRIn of MDCstle". But if we look to the right answer on forum it's: "MDDER THn MD BRIn of MDCstle".

I even do type this phrase by myself with using task description. And i get same result as mine code get. So can you tell, am i wrong? And if it's yes - where excactly i made mistake.

Thanks and <3 from Russia

Attachment
  • bug
  • code_review
  • feedback
Created: April 23, 2021, 8:14 a.m.
Updated: Aug. 16, 2021, 12:35 p.m.
1
14
User avatar
nicknicknick