Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
1line solution in Clear category for Sort by Extension by wooilkim
from typing import List
def sort_by_ext(files: List[str]) -> List[str]:
return sorted(files, key=lambda x: ((x[x.rindex('.'):], x[:x.rindex('.')]) if x.rindex('.') > 0 else tuple(('.', x))))
May 27, 2021