PYTHON || Well-explained || 97.33% faster || Easy-understanding ||
Idea :\nSplit the string into left and right , then create the possible string seperately , then merge .\n\n When there is only one letter in the string , direc
## **Idea :**\nSplit the string into left and right , then create the possible string seperately , then merge .\n\n* When there is only one letter in the string , directly return itself.\n* when the first and last letter is \'0\', then it\'s impossible to create a valid string, return []\n* when the first letter is \'0\', then we only have one choice : \'0.xxxx\'\n* when the last letter is \'0\', then we only have one choice , the string itself.\n* all other , we can put \'.\' between any two letters.\n\n\'\'\'\n\n\tclass Solution:\n    def ambiguousCoordinates(self, s: str) -> List[str]:\n        \n        def create(num):\n            l=len(num)\n            if l==1:\n                return [num]\n            if num[0]=="0" and num[-1]=="0":\n                return []\n            if num[0]=="0":\n                return ["0."+num[1:]]\n            if num[-1]=="0":\n                return [num]\n            local=[num]\n            for i in range(1,len(num)):\n                local.append(num[:i]+"."+num[i:])\n            return local\n        \n        s=s[1:-1]\n        n=len(s)\n        res=[]\n        for i in range(1,n):\n            left = create(s[:i])\n            right= create(s[i:])\n            if not left or not right:\n                continue\n            for l in left:\n                for r in right:\n                    res.append(f\'({l}, {r})\')\n        return res\n\nThank You!!\nIf you dont get it , feel free to ask.
['Math', 'Python']