Python-匹配算法(未完)

In [1]: def naive_machine(self,p): # self是目标字符串,p是需要查找的字符串,朴素匹配算法
   ...:     if not isinstance(self,str) and not isinstance(p,str):
   ...:         raise stringTypeError
   ...:     m,n = len(p),len(self)
   ...:     i,j = 0,0
   ...:     while i

 

你可能感兴趣的:(Python)