Skip to main content

Stack.pop

Remove the element at the top of the stack

Usage

pop()

Returns:
      element
            Returns and remove the element at the top of the stack

Example

from jellybeans.structures import Stackst = Stack()st.push(20)st.push(29)st.push(38)st.push(78)print(st.pop()) # 78print(st) # 38 <- 29 <- 20