In [53]: def find(string=s):
...: flag=True
...: print(string)
...: tmp=string[0]
...: for inx, s in enumerate(string[1:]):
...: print(tmp, s)
...: if s not in tmp:
...: tmp+=s
...: else:
...: results.append(tmp)
...: start = string.index(s)
...: print(start)
...: flag = False
...: break
...: if not flag:
...: find(string=string[start+1:])
...: else:
...: results.append(tmp)
网友评论