Skip to content

Instantly share code, notes, and snippets.

import os
from statistics import median
def endswithin(s, suffixes):
return any(s.endswith(suffix) for suffix in suffixes)
def avg_lines(files):
total = sum(lines for _, lines, _ in files)
return total // len(files) if files else 0