結果 : how to iterate through a stack in python