結果 : sort list based on two values python