Question:
My Solution:
class Solution:
def threeConsecutiveOdds(self, arr: List[int]) -> bool:
for i in range(0, len(arr)):
if (arr[i] % 2 == 1):
try:
if (arr[i+1] % 2 == 1) and (arr[i+2] % 2 == 1):
return True
except:
return False
return False
URL to Leetcode: