A stack is a LIFO (Last-In, First-Out) collection: the last element pushed is the first one popped. You only ever touch the top.
Operations
text
push(3) push(7) pop()->7 peek()->3
[ 3 ] [ 7 ] [ 3 ] [ 3 ]
[ 3 ] top
top
Example
python
stack = []
stack.append()
stack.append()
top = stack[-]
stack.pop()
