Simple commented Python Solution
\nclass Solution:\n    def ambiguousCoordinates(self, S):\n        \n        def possible_val(S):\n            ret = set()\n            # S itself valid\n      
```\nclass Solution:\n    def ambiguousCoordinates(self, S):\n        \n        def possible_val(S):\n            ret = set()\n            # S itself valid\n            if S[0]!=\'0\' or len(S)==1:\n                ret.add(S)\n            for _ in range(1, len(S)):\n                left, right = S[:_], S[_:]\n                # left of . valid if first char is not \'0\' or its length is just 1\n                if len(left)==1 or not left[0]==\'0\':\n                    # right of . valid if last char is not \'0\'\n                    if right[-1]!=\'0\':\n                        ret.add(left+\'.\'+right)\n            return ret\n        \n        # Remove parenthesis\n        S = S[1:-1]\n        ret = []\n        for i in range(1, len(S)):\n            # S1: String for first coord, S2: String for second coord\n            S1, S2 = S[:i], S[i:]\n            # Possible values for S1 and S2\n            s1, s2 = possible_val(S1), possible_val(S2)\n            if not s1 or not s2: continue\n            for c1 in s1:\n                for c2 in s2:\n                    ret.append(\'(\'+c1+\', \'+c2+\')\')\n        return ret\n```
[]