Skip to main content

Stack.push

Insert an item into the stack

Usage

push(item:Any)

Parameters:
      item : element
            The element to be added into the stack

Example

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