MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / pop

Method pop

linked_lists/linked_stack.py:35–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33
34
35 def pop(self):
36 if self.is_empty():
37 raise Empty("stack is emoty")
38
39 answer = self._head._element
40 self._head = self._head._next
41 self._size -= 1
42 return answer
43

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.95
EmptyClass · 0.70

Tested by

no test coverage detected