Untitled
Anonymous
python
05/29/2024 8:09 PM
272 B
13
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