Stacks in Python and Selecting the Ideal Data Structure

preview_player
Показать описание
A stack is a collection that stores arbitrary items in an order specified by Last-In/First-Out (LIFO) semantics. This means that the last item put into the stack is the first item available for removal from the stack. This is similar to a pile of lunch room trays -- you access the most recent tray put on top first.

There is no native stack implementation in Python. Your choices for a stack are: using the built-in `list` type, the `deque` object from the `collections` library, or `queue.LifoQueue`.

Рекомендации по теме
Комментарии
Автор

Superb, Please put the another 2 videos links in Description.

Vigneswarareddy
Автор

Can you also put the links in description 👍 awesome video btw ✌️

Prashantsingh-xcho
Автор

Yes, please DO provide the links to 1) and 2)...Come on Real Python...

tyronefrielinghaus