Update stack.py

add ifStack and printStack