(self)
| 28 | self.__head = self.__head.ref |
| 29 | |
| 30 | def top(self): |
| 31 | # prints the topmost element, i.e, head in the case of LL |
| 32 | if self.isEmpty(): |
| 33 | print("Stack is empty.") |
| 34 | return |
| 35 | print(self.__head.data) |
| 36 | |
| 37 | def isEmpty(self): |
| 38 | return(self.__size == 0) |
no test coverage detected