Untitled
unknown
python
2 years ago
204 B
8
Indexable
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 FalseEditor is loading...
Leave a Comment