結果 : how to avoid string index out of range python