結果 : select first and last element of list python