Files

03 — Napisy i pliki (f-string, pathlib.Path, with open)

Zadania (strings_files.py)

  1. parse_key_value_lines(raw: str) -> dict[str, str] — sparsuj linie KEY=VALUE, ignorując puste linie i komentarze #.
  2. count_non_empty_lines(path: Path) -> int — policz niepuste linie w pliku tekstowym (użyj with path.open(...) lub read_text).

Uruchomienie testów

make test MOD=01-core/03-strings-files