結果 : how to check if error in python