Update stack.py