Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a Python function called sequenceDeTrois which takes a string and returns True if there is at least a sequence of 3 consecutive equal characters,
Create a Python function called sequenceDeTrois which takes a string and returns True if there is at least a sequence of 3 consecutive equal characters, and False otherwise. Make sure that the function is efficient: it must stop as soon as the result is known (as soon as 3 consecutive characters with the same value have been found). Don't forget to add the contract type in comments.
Step by Step Solution
★★★★★
3.40 Rating (172 Votes )
There are 3 Steps involved in it
Step: 1
Below is a Python function called sequenceDeTrois that takes a string as input and returns True if t...
Get Instant Access to Expert-Tailored 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