Python solution (sorting with key via lambda)
```\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        letter_logs = []\n        digit_logs = []\n        \n        # will 
```\nclass Solution:\n    def reorderLogFiles(self, logs: List[str]) -> List[str]:\n        letter_logs = []\n        digit_logs = []\n        \n        # will do loop thorugh the list of logs and separate letter logs and digit logs to dfifferent lists,\n\t\t# so at the eand after sorting letter logs we can return combined list\n        \n        for log in logs:\n            if log.split(\' \')[1].isdigit():\n                digit_logs.append(log)\n            else:\n                letter_logs.append(log)\n        # after seperating logs to different lists we sort letter logs\n        # whatever comes first in lambada function it sorts by that parametr,\n\t\t# if second parametr is given, it checks for sorint by first parametr and after sorts by given second parametr in lambda function\n        \n        letter_logs.sort(key=lambda x: (x.split(\' \')[1:], x.split(\' \')[0]))\n        return letter_logs + digit_logs
['Python']