[Python 3] Simple and Straight 44ms
def reorderLogFiles(self, logs):\n        """\n        :type logs: List[str]\n        :rtype: List[str]\n        """\n        digits, letters = [], []\n        
    def reorderLogFiles(self, logs):\n        """\n        :type logs: List[str]\n        :rtype: List[str]\n        """\n        digits, letters = [], []\n        for x in logs:\n            splited = x.split()\n            if ord(splited[1][0]) >= 97 and ord(splited[1][0]) <= 122:\n                letters.append([x, splited[0], splited[1:]])\n            else:\n                digits.append(x)\n        \n        letters.sort(key = lambda x: x[1])\n        letters.sort(key = lambda x: x[2])\n\n        ans = []\n\n        for x in letters:\n            ans.append(x[0])\n        for x in digits:\n            ans.append(x)\n\n        return ans
[]