Python easy
\nclass Solution(object):\n    def maxLengthBetweenEqualCharacters(self, s):\n        lastSeen = dict()\n        maxDist = -1\n        for index, char in enumer
```\nclass Solution(object):\n    def maxLengthBetweenEqualCharacters(self, s):\n        lastSeen = dict()\n        maxDist = -1\n        for index, char in enumerate(s):\n            if char not in lastSeen:\n                lastSeen[char] = index\n            else:\n                maxDist = max(index - lastSeen[char], maxDist)\n                \n        return maxDist - 1 if maxDist > -1 else -1\n        \n```
['Python', 'Python3']