Update the example again

This commit is contained in:
2026-02-11 15:16:01 -08:00
parent a9f6cac711
commit 23bf255240
2 changed files with 4 additions and 6 deletions

View File

@@ -19,8 +19,8 @@ class LinkedList:
self.head=Node(value=thing)
self.tail=self.head
return
self.tail.nextNode=Node(value=thing)
self.tail=self.tail.nextNode
self.tail.next_node=Node(value=thing)
self.tail=self.tail.next_node
list1=LinkedList()
@@ -28,8 +28,6 @@ list1.append('hi')
list1.append('hi again')
list1.append('why am I saying hi so many times?')
print(list1.head.value)
print(list1.head.nextNode.value)
print(list1.head.nextNode.nextNode.value)
print(list1.head.next_node.value)
print(list1.head.next_node.next_node.value)