added __init__

This commit is contained in:
2026-03-15 16:27:32 -04:00
parent 511dd6a9db
commit 5b3f9eff6b

View File

@@ -19,7 +19,9 @@ class Stack[T]:
def __init__(self):
pass
''' initializes an empty stack '''
self._data = LinkedList()
def __len__(self) -> int:
''' allows the len function to be called using an ArrayStack object, e.g.,
stack = ArrayStack()