Here is what I have done:
seq = [0,1,1,1,0]
num = 0
for i in seq:
if seq[i] == seq[i+1]:
num = num+1
else:
continue
print(num)
I am expected to come up with the number of occurence of '11' in the sequence, i.e. '11' and '11' and the answer is saying 2.