From 1fd05fbf2549f08b481b193c11e40ab59dfda4ba Mon Sep 17 00:00:00 2001 From: SerKin0 <71343548+SerKin0@users.noreply.github.com> Date: Wed, 25 Feb 2026 09:00:04 +0300 Subject: [PATCH] =?UTF-8?q?[1]=20=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=81=D0=B2?= =?UTF-8?q?=D1=8F=D0=B7=D0=B0=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=81=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D1=81=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=BA=D1=83=20=D1=81=D0=BB=D0=BE=D0=B2=D0=B0=D1=80=D0=B5?= =?UTF-8?q?=D0=B9=20create=5Flinked=5Flist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skorohodovsa/task_1/linked_list.py | 45 ++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/skorohodovsa/task_1/linked_list.py b/skorohodovsa/task_1/linked_list.py index 7351f7e..d7caab6 100644 --- a/skorohodovsa/task_1/linked_list.py +++ b/skorohodovsa/task_1/linked_list.py @@ -1,13 +1,36 @@ +def create_node(name: str, phone: str, next: dict = None): + return {"name": name, "phone": phone, "next": next} -def create_node( - name: str, - phone: str, - next: dict = None -): - return { - 'name': name, - 'phone': phone, - 'next': next - } - \ No newline at end of file +def create_linked_list(data: list[dict]) -> dict: + if data is None or len(data) == 0: + raise ValueError("Список пустой!") + + base = create_node(**data[0]) + + current = base + for value in data[1:]: + current['next'] = create_node(**value) + current = current['next'] + + return base + + +def ll_insert(): + pass + + +def ll_find(): + pass + + +def ll_delete(): + pass + + +def ll_list_all(): + pass + + +def ll_print_all(): + pass \ No newline at end of file