結果 : find longest matching substring python