結果 : check if index exists in dictionary python