Python Beats 100% with Comments
\nclass Solution:\n    def reverseStr(self, s, k):                \n\t\t# Divide s into an array of substrings length k\n\t\ts = [s[i:i+k] for i in range(0, len
```\nclass Solution:\n    def reverseStr(self, s, k):                \n\t\t# Divide s into an array of substrings length k\n\t\ts = [s[i:i+k] for i in range(0, len(s), k)]\n\t\t# Reverse every other substring, beginning with s[0]\n        for i in range(0, len(s), 2):\n            s[i] = s[i][::-1]\n\t\t# Join array of substrings into one string and return \n        return \'\'.join(s)\n```
[]