arr = [1, 1, 0, 1, 1, 1, 0, 1]
max_cnt = 0
cnt = 1
for i in range(len(arr) - 1):
if arr[i] == 1 and arr[i + 1] == 1:
cnt += 1
else:
cnt = 1
if cnt > max_cnt:
max_cnt = cnt
print(max_cnt)
To embed this project on your website, copy the following code and paste it into your website's HTML: