line.
Decide whether line can be built by taking some substring of it and writing it out **two or more** times in a row. Return True if it can and False otherwise.line='xyzxyz' → True
The string is the block "xyz" written twice.
line='xyzxy' → False
The length 5 is divisible only by 1 and 5, and the string is not a single repeated letter, so no block fits.
line='q' → False
At least two copies are required, and a single letter is only one copy of itself.
line.length ≤ 10⁴line consists of lowercase English letters onlyline='xyzxyz'
True
Run checks the first 3 tests in your browser. Submit checks all 90 tests on the server, hidden ones included.