Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Sort by Extension by Jose_Facundo_Bogado_Navarrete
from typing import List
def sort_by_ext(files: List[str]) -> List[str]:
# your code here
k_x = lambda x: x.split(".")[-1]+x if (x.find(".")>0 or x[1::].find(".")>0) and x[-1]!="." else "a"+x
return sorted(files,key=k_x)
April 30, 2021
Comments: