Untitled
Anonymous
python
05/29/2024 8:00 PM
196 B
12
Indexable
def has22(nums):
i = 0
while i < len(nums) - 1:
if nums[i] == 2 and nums[i + 1] == 2:
return True
i += 1
return FalseEditor is loading...
Leave a Comment
def has22(nums):
i = 0
while i < len(nums) - 1:
if nums[i] == 2 and nums[i + 1] == 2:
return True
i += 1
return False