# MCS 260 L-21 Mon 1 Mar 2010 : a stack # # definition of a module to store a stack # of some data from stack_data import the_stack def push(item): "pushes the item on the stack" the_stack.insert(0,item) def length(): "returns the length of the stack" return len(the_stack) def pop(): "returns an item off the stack" return the_stack.pop(0)