added __len__
This commit is contained in:
@@ -29,7 +29,7 @@ class Stack[T]:
|
||||
Returns:
|
||||
number of elements in the stack, as an integer
|
||||
'''
|
||||
pass
|
||||
return len(self._data)
|
||||
|
||||
def push(self, item: T) -> None:
|
||||
''' pushes a given item of arbitrary type onto the stack
|
||||
|
||||
Reference in New Issue
Block a user