MCPcopy
hub / github.com/ndleah/python-mini-project / printData

Method printData

Stack_structure/main.py:30–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 self.top = self.top.next
29
30 def printData(self):
31 print("Printing stack: ")
32
33 # Step through the stack and print values
34 tmp_node = self.top
35
36 while tmp_node != None:
37 print (f"[{tmp_node.data}]", end = "")
38 tmp_node = tmp_node.next
39
40 print("")
41
42stack = Stack()
43stack.push('a')

Callers 1

main.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected