Question 1
Write a function is_repeated_thrice(s) that returns True if the non-empty string s is made by writing the same piece of text exactly three times one after the other, like "abcabcabc". This needs the length of s to be divisible by 3 and its three equal-sized parts to be identical. Otherwise it returns False.
NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition.
Example
is_repeated_thrice("abcabcabc") -> True
is_repeated_thrice("xyzxyzxyz") -> True
Your task
Implement this function:
def is_repeated_thrice(s: str) -> bool:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: s.
Example
Input
"abcabcabc"
Output
True