Files
algorithms-26/task1.py

29 lines
604 B
Python

from dataclasses import dataclass
from typing import Iterable
@dataclass
class Poem:
name: str
author: str | list[str]
body: str
def load_data() -> list[Poem]:
raise NotImplementedError
def search_by_author(poems: list[Poem], author: str) -> list[Poem]:
raise NotImplementedError
def get_sorted_poems(poems: list[Poem]) -> list[Poem]:
raise NotImplementedError
def print_poems(poems: Iterable[Poem]) -> None:
raise NotImplementedError
poems = load_data()
author: str = input()
poems = search_by_author(poems, author)
poems = get_sorted_poems(poems)
print_poems(poems)