結果 : avoid index out of range error python