結果 : check if index in range python