Python3 simple solution
\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        l = []\n        d = []\n        for i in logs:\n            if i.split(
```\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        l = []\n        d = []\n        for i in logs:\n            if i.split()[1].isdigit():\n                d.append(i)\n            else:\n                l.append(i)\n        l.sort(key = lambda x : x.split()[0])\n        l.sort(key = lambda x : x.split()[1:])\n        return l + d\n```\n**If you like this solution, please upvote for this**
['Python3']