MCPcopy Index your code
hub / github.com/BeeBombshell/Python-DSA / display

Method display

DSA/SinglyLinkedList.py:109–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107
108 #meethod to display the nodes of the list
109 def display(self):
110 temp = self.head
111 if self.isEmpty():
112 print("List is Empty")
113 return
114 print("head -> ", end = " ")
115 while (temp.next != None):
116 print(temp.data, end = " -> ")
117 temp = temp.next
118 print(temp.data, " <- tail")
119
120n = SinglyLinkedList()
121n.addFront(3)

Callers 1

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected