結果 : longest substring python code