there are two primary operations that are done on stackspush and pop when an element is added to the top of the stackit is pushed onto the stack when an element is taken off the top of the stackit is popped off the stack another operation which is used sometimes is peekwhich makes it possible to see the element on the stack without popping it off stacks are used for number of things one very common usage for stacks is to keep track of the return address during function calls let' imagine that we have the following little programdef ()print(' 'def () ( (print("done"when the program execution gets to the call to ()it first pushes the address of the following instruction onto the stackthen jumps to inside ab(is calledbut before thatthe return address is pushed onto the stack once in (and the function is donethe return address is popped off the stackwhich takes us back to (when has completedthe return address is popped off the stackwhich takes us back to the print statement stacks are actually also used to pass data between functions say you have the following function call somewhere in your codesomefunc( 'eggs''ham''spam'what is going to happen is that 'eggs''hamand 'spamwill be pushed onto the stackone at time