Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
filename.rpartition('.'), partial(sorted, key=...) solution in Clear category for Sort by Extension by Phil15
from functools import partial
def _sort_by_ext_key(filename):
name, _, ext = filename.rpartition('.')
return (ext, name) if name else ('', ext)
sort_by_ext = partial(sorted, key=_sort_by_ext_key)
March 9, 2020
Comments: