結果 : how to write error handling in python