結果 : how to avoid index out of range python