Match from that rotating point
for k in range ( lps [ n - 1 ] , m ) : NEW_LINE INDENT if ( b [ k ] != a [ i ] ) : NEW_LINE INDENT return False NEW_LINE DEDENT i += 1 NEW_LINE DEDENT return True NEW_LINE