結果 : how to use try and except in python function