From 88bcf8a761a115ead9a366ff1de09b7b28cb2ab3 Mon Sep 17 00:00:00 2001 From: SerKin0 <71343548+SerKin0@users.noreply.github.com> Date: Fri, 6 Mar 2026 09:55:45 +0300 Subject: [PATCH] =?UTF-8?q?[1]=20=D0=9D=D0=B0=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skorohodovsa/task_1/linked_list.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/skorohodovsa/task_1/linked_list.py b/skorohodovsa/task_1/linked_list.py index d7caab6..b1fe2d3 100644 --- a/skorohodovsa/task_1/linked_list.py +++ b/skorohodovsa/task_1/linked_list.py @@ -12,7 +12,7 @@ def create_linked_list(data: list[dict]) -> dict: for value in data[1:]: current['next'] = create_node(**value) current = current['next'] - + return base @@ -20,8 +20,15 @@ def ll_insert(): pass -def ll_find(): - pass +def ll_find(head: dict, name: str) -> str | None: + if head is None: + raise ValueError("Словарь пустой!") + + current = head + while current['next'] is not None: + if current['name'] == name: + return current['name'] + return None def ll_delete():