Untitled
unknown
python
2 years ago
145 B
6
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