Python solution
\nclass Solution(object):\n    def maxLengthBetweenEqualCharacters(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        d = {
```\nclass Solution(object):\n    def maxLengthBetweenEqualCharacters(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        d = {}\n        for i, k in enumerate(s):\n            if k not in d:\n                d[k] = [i,i]\n            else:\n                d[k][1] = i\n                \n        return max([i[1] - i[0] - 1 for i in d.values()])\n                \n            \n```
['Python']