List(List(Path("filepath").read_text_file().splitlines()).group_by_key(lambda x:x).items()).map(lambda x:(len(x[1]),x[0])).sorted()
sorted((count, line) for (line, count) in Counter(Path("filepath").read_text().splitlines()).items())
Sure, but you can do that for any functionality in any practical language.
Sure, but you can do that for any functionality in any practical language.