Check if the stack is empty. Returns: True if the stack has no elements.
(self)
| 31 | return "Top-> " + result |
| 32 | |
| 33 | def is_empty(self) -> bool: |
| 34 | """Check if the stack is empty. |
| 35 | |
| 36 | Returns: |
| 37 | True if the stack has no elements. |
| 38 | """ |
| 39 | return self._top == -1 |
| 40 | |
| 41 | @abstractmethod |
| 42 | def __iter__(self) -> Iterator[object]: |