I have a simple list where:
a = [1,1,1,0,0,1,0,1,1,0,1,1,1]
I am trying to find a way to determine when three ones appear adjacent to each other. So the output would say that there are two instances of this, based on the list above. The other posts I've read seem to use itertools.groupby(), but I'm not familiar with it so I was wondering if there is another way?