added is_empty
This commit is contained in:
@@ -67,7 +67,7 @@ class Stack[T]:
|
|||||||
Returns:
|
Returns:
|
||||||
True if the stack is empty, False otherwise
|
True if the stack is empty, False otherwise
|
||||||
'''
|
'''
|
||||||
pass
|
return len(self._data) == 0
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
''' returns an str implementation of the Stack '''
|
''' returns an str implementation of the Stack '''
|
||||||
|
|||||||
Reference in New Issue
Block a user