Untitled
Anonymous
python
05/29/2024 8:08 PM
296 B
16
Indexable
def has22(nums):
prev_two = False
for idx, val in enumerate(nums):
if val == 2:
if prev_two:
return True
else:
prev_two = True
else:
prev_two = False
return FalseEditor is loading...
Leave a Comment