結果 : how to check if stack empty in python