Simplest Python 3 code
\nclass Solution:\n    def minimumMoves(self, s: str) -> int:\n        sl=list(s)\n        out=0\n        for i in range(0,len(sl)-2):\n            if sl[i]=="X
```\nclass Solution:\n    def minimumMoves(self, s: str) -> int:\n        sl=list(s)\n        out=0\n        for i in range(0,len(sl)-2):\n            if sl[i]=="X":\n                sl[i]="O"\n                sl[i+1]="O"\n                sl[i+2]="O"\n                out+=1\n            elif sl[i]=="O":\n                continue\n        if sl[-1]=="X" or sl[-2]=="X":\n            out+=1\n        return out\n```
['Python3']