Untitled

mail@pastecode.io avatar
unknown
python
14 days ago
204 B
2
Indexable
Never
def has22(nums):
  prev_two = False
  
  for num in nums:
    if num == 2:
      if prev_two:
        return True
      else:
        prev_two = True
    else:
      prev_two = False
      
  return False
Leave a Comment