Question: Using Python 3 Programming: Implement a function consecutives(aList) that takes a list of integers as argument and return the maximum number of consecutive integers that
Using Python 3 Programming:
Implement a function consecutives(aList) that takes a list of integers as argument and return the maximum number of consecutive integers that are all equal, within this list.
For instance, the following statements:
l1 = [1,1,1,3,3,4,4,4,4,4,3,1,7,3,3,4,4]
l2 = []
l3 = [1,2,1,1,2,1,1]
print(consecutives(l1))
print(consecutives(l2))
print(consecutives(l3))
lead to the following result on the IDLE:
5
0
2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
