MCPcopy Create free account
hub / github.com/geekcomputers/Python / display

Method display

singly_linked_list.py:96–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 curr_pos += 1
95
96 def display(self):
97 if self.head is None:
98 print("List is empty")
99 rev = []
100 curr = self.head
101 while curr != None:
102 print(f"{curr.data} --> ", end="")
103 rev.append(curr.data)
104 curr = curr.next
105 print()
106 return rev[::-1]

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected