Question
can't use for loop or of statements to solve. ID def is_triple_string(string: str) -> bool: This function is a little similar to the triangle string
can't use for loop or of statements to solve.
ID def is_triple_string(string: str) -> bool: This function is a little similar to the triangle string function above, if you feel like you can reuse some of the code you wrote for that function here, feel free to do so. Given a string , return whether it is a triple string. For the purposes of this function, we define a triple string as any string that is made up of some substring repeating exactly three times. For the MAT102 folks out there, that is, any combination of characters C such that there exists a substring c of C and C = c+c+c. For example, the string "111" is a triple string, which consists of "1" repeated three times. "111111" is also a triple string, which consists of "11" repeated three times. I Please remember to write doctests, you must write them below this line:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started