chore: initialize containerized Python learning workbook (2026 DevOps/SRE)

This commit is contained in:
soda64 committed 2026-11-30 22:55:56 +01:00
commit ae4c421815
63 files changed
+1273

No files matched your search

@@ -0,0 +1,18 @@
from collections_ex import first_and_last, unique_sorted, word_counts
def test_unique_sorted() -> None:
assert unique_sorted([3, 1, 2, 3, 1]) == [1, 2, 3]
assert unique_sorted([]) == []
def test_word_counts() -> None:
counts = word_counts("Python python is great and PYTHON works")
assert counts["python"] == 3
assert counts["is"] == 1
def test_first_and_last() -> None:
assert first_and_last([]) is None
assert first_and_last(["only"]) == ("only", "only")
assert first_and_last(["a", "b", "c"]) == ("a", "c")