Skip to content

Commit 238f304

Browse files
authored
Update add_node.py
1 parent df5a0c6 commit 238f304

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data_structures/linked_list/add_node.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
class Node: #define a class named node having data and ref as attributes
1+
class Node:
22
def __init__(self,data:int)->None:
33
self.data=data
44
self.ref= None
55
class LinkedList:
6-
def __init__(self)->None #define head of the linked list i.e initiate the linked list
6+
def __init__(self)->None:
77
self.head=None
8-
def print_ll(self): # to print the linked list
8+
def print_ll(self):
99
if self.head is None:
1010
print("The Linked List is empty ")
1111
else:

0 commit comments

Comments
 (0)