Skip to main content

Practice ยท 2 of 3

Group by Extension

Implement by_suffix(paths) returning a dict mapping suffix (including the dot, lowercase) to a sorted list of path names. Files without a suffix go under ''.

Difficulty: intermediate

Back to lesson: Practice: pathlib Drills