I would like to give some feedback about ...
i don't know how to do with ".bat" or '.aa.doc'
def sort_by_ext(files: List[str]) -> List[str]:
files=sorted(files)
files=sorted(files, key=lambda x: x[2:len(x)])
return files
sortbyext(['1.cad', '1.bat', '.aa', '.bat']) == ['.aa', '.bat', '1.bat', '1.cad']
sortbyext(['1.cad', '1.bat', '1.aa', '1.aa.doc']) == ['1.aa', '1.bat', '1.cad', '1.aa.doc']
Your result:["1.aa",".bat","1.bat","1.cad"]
Right result:[".bat","1.aa","1.bat","1.cad"]
From: https://py.checkio.org/mission/sort-by-extension/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Created at: 2020/07/04 08:36; Updated at: 2020/07/30 13:55