結果 : check if stack is not empty python