Question: We'll say that a triple in a string is a character that appears three times in a row. Triples may overlap. For example, the string
We'll say that a triple in a string is a character that appears three times in a row. Triples may overlap. For example, the string 'AAAxBBBBxyz' contains three triples. Write code that counts the number of triples in a string named text and stores the result in a variable named triple_count. Assume that the variable text already has a value Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
