def Z_algorithm(lst): le=len(lst) LCP=[None]*le LCP[0]=le L,R=0,0 for i in range(1,le): if i