Skip to content

Commit 3de1859

Browse files
authored
Update add_node.py
1 parent 1891e85 commit 3de1859

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_structures/linked_list/add_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def print_LL(self): # to print the linked list
1010
print("The Linked List is empty ")
1111
else:
1212
n= self.head
13-
while n is n ot None:
13+
while n is not None:
1414
print(n.data)
1515
n=n.ref
1616
def add_begin(self,data): #to add a node in the beginning
@@ -41,4 +41,4 @@ def add_after(self,data,x):
4141
linked_list.add_begin(22)
4242
linked_list.add_after(30,11)
4343
linked_list.print_LL()
44-
#https://youtu.be/xRTdfZsAz6Y?si=EMrqVJpXjDDz1kEF
44+
#https://youtu.be/xRTdfZsAz6Y?si=EMrqVJpXjDDz1kEF

0 commit comments

Comments
 (0)