結果 : how to traverse a stack in python