python3
```\nclass Solution:\n    def maxPower(self, s: str) -> int:\n        if not s:return 0\n        c=1\n        mc=1\n        for i in range(len(s)-1):\n         
```\nclass Solution:\n    def maxPower(self, s: str) -> int:\n        if not s:return 0\n        c=1\n        mc=1\n        for i in range(len(s)-1):\n            if s[i]==s[i+1]:\n                c+=1\n            else:\n                c=1\n            mc=max(c,mc)\n        return mc
[]