Skip to content

Commit

Permalink
Added is_empty method
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAihopGG committed Jun 1, 2024
1 parent 03189ef commit a2b25f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ufpy/ustack.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def append(self, *items) -> UStack:
for item in items:
self.__list.append(item)
return self.__list

def is_empty(self) -> bool:
return len(self) == 0

def __add__(self, stack: UStack) -> UStack:
return UStack(self.__list + stack.__list)
Expand Down

0 comments on commit a2b25f3

Please sign in to comment.