- __init__ (Initialize a new empty stack)
- push (add a new item to the stack
- pop (remove and return an item from the stack. the item that is returned is always the last one that was added)
- is_empty (check whether the stack is empty)
The data structure is LIFO called "Last in, First out"
没有评论:
发表评论