Re: A Q. on pop().

2005-03-17 Thread Duncan Booth
spencer wrote: > first Q.. Why is pop() starting from the back > back of the stack? Because that is what it does. Try reading the documentation: >>> help(list.pop) Help on method_descriptor: pop(...) L.pop([index]) -> item -- remove and return item at index (default last) > sec

A Q. on pop().

2005-03-17 Thread spencer
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor) print 'after pop...', dirStackMinor When I start the "for" loop I