[Python3] Simple And Readable Solution
\nclass Solution:\n    def maxLengthBetweenEqualCharacters(self, s: str) -> int:\n        ans = [-1]\n        \n        for i in set(s):\n            if(s.count
```\nclass Solution:\n    def maxLengthBetweenEqualCharacters(self, s: str) -> int:\n        ans = [-1]\n        \n        for i in set(s):\n            if(s.count(i) >= 2):\n                ans.append(s.rindex(i) - s.index(i) - 1 )\n        \n        return max(ans)\n```
['Python3']