Skip to main content

Stack.is_empty

Checks if there are elements in the stack

Usage

is_empty()

Returns:
      Boolean
            Returns True if there are 0 elements in the stack

Example

from jellybeans.structures import Stackst = Stack()st.push(20)st.push(29)print(st.is_empty()) # False