結果 : how to handle an error in python