def is_repeated(text):
    'check if the first part of the string is repeated throughout the string'
    for x in range(len(text)
        if text.startswith(text[x:]): return x
    return 0

matchstr = 
for line in matchstr.split():
    ln = is_repeated(line)
    print('%r has a repetition length of%i i.e.%s' 
          % (line, ln, repr(line[:ln]) if ln else '*not* a rep-string'))