Given a list of duplicate numbers, how to find a number that repeats three times in a row. For example:
list = [1,1,2,2,3,3,3,4,4]
I want to print element number 3 as it appears three times in a row.
I have tried using
Counter, which converts this to dict, but not sure how to just print the key that as the max count value.