[2] 2-st-exercise #356

Merged
IvanBoy merged 28 commits from volkovva/2026-rff_mp:2-st-exercise into develop 2026-05-30 12:03:19 +00:00
Showing only changes of commit 21985795a1 - Show all commits

View File

@ -0,0 +1,20 @@
import random as rnd
def ll_insert(head, name, phone):
new_node = {'name': name, 'phone': phone, 'next': None}
if head is None:
return new_node
current = head
while current is not None:
if current['name'] == name:
current['phone'] = phone
return head
current = current['next']
new_node['next'] = head
return new_node