結果 : get first and last element of dictionary python