Sample implementation of stack in python using list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|my_first_stack = |
|# Push elements to stack using append()|
|print('My First Stack')|
|#Retrieve elements from the stack|
|print('\nElements retrieved from the stack:')|
|#Now print the stack and see the remaining elements|