Python explained. [Runtime 11 ms, Beats 97.37%]
\n\n# Code\n\nclass Solution(object):\n    def minimumMoves(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        \n        # 
![Screenshot 2023-04-09 9.10.17 PM.png](https://assets.leetcode.com/users/images/ade7310a-56d1-4236-8e8e-ddce6f714c42_1681054849.6592138.png)\n\n# Code\n```\nclass Solution(object):\n    def minimumMoves(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        \n        # Indexing int.\n        a = 0\n\n        # Minimum moves.\n        b = 0\n\n        # Looping till index is beyond length of string.\n        while (a < len(s)):\n\n            # If \'X\' is found.\n            if s[a] == \'X\':\n\n                # Index forward by 3.\n                # As there is to be \'OOO\'.\n                a += 3\n\n                # Add 1 to b as min move.\n                b += 1\n            \n            # If \'O\' is found.\n            else:\n                \n                # Index forward by 1.\n                a += 1\n\n        # Return minimum moves.\n        return b\n```
['Python']