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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!