# L-18 MCS 260 Mon 8 Oct 2007 : i/o of stack # # definition of a module to print a stack # of integer numbers from stack_data import the_stack def input(L): "places elements of L on stack" for item in L: the_stack.insert(0,item) def show_all(): "shows all elements in the stack" print the_stack def show_top(): "shows the top element of the stack" if len(the_stack) > 0: print the_stack[0] else: print 'the stack is empty'