Easy Solution in Python || Beats 70%run time
Code\n\nclass Solution(object):\n    def maxPower(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        stack=[]\n        mxpo
# Code\n```\nclass Solution(object):\n    def maxPower(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        stack=[]\n        mxpow=0\n        for i in s:\n            if stack and stack[-1]!=i:\n                mxpow=max(mxpow,len(stack))\n                stack=[]\n                stack.append(i)\n            else:\n                stack.append(i)\n        mxpow=max(mxpow,len(stack))\n        return mxpow\n```
['Python']