Easy To Read | Python Solution
Code\npython3 []\nclass Solution:\n    def maxLengthBetweenEqualCharacters(self, s: str) -> int:\n        first_occ = {}\n        max_length = -1\n\n        for
# Code\n```python3 []\nclass Solution:\n    def maxLengthBetweenEqualCharacters(self, s: str) -> int:\n        first_occ = {}\n        max_length = -1\n\n        for i in range(len(s)):\n            if s[i] not in first_occ:\n                first_occ[s[i]] = i\n            else:\n                max_length = max(max_length, i - first_occ[s[i]] - 1)\n        \n        return max_length\n```
['Python3']