結果 : how to write sort function in python