From 81b65186b3dd8ae393a6c4da1d55a1cad9f04af7 Mon Sep 17 00:00:00 2001 From: Akash <61753841+Akash-Pavithran@users.noreply.github.com> Date: Thu, 18 Mar 2021 17:22:57 +0530 Subject: [PATCH] Update main.py --- Linked_List/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Linked_List/main.py b/Linked_List/main.py index b0ba0a5..e8820d2 100644 --- a/Linked_List/main.py +++ b/Linked_List/main.py @@ -1,9 +1,10 @@ - +# Each node contains a 'data' and link to the 'next' node class node: def __init__(self,data=None): self.data=data self.next=None +# linked_list contains the nodes that we created above. class linked_list: def __init__(self): self.head=node() @@ -127,4 +128,4 @@ def set(self,index,data): if cur_idx==index: cur_node.data=data return - cur_idx+=1 \ No newline at end of file + cur_idx+=1