Skip to content

Commit b0ed9f8

Browse files
authored
Create has22.py
1 parent 3b54aa5 commit b0ed9f8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

List-2/has22.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def has22(nums):
2+
n = len(nums)
3+
for i in range(n-1):
4+
if nums[i] == 2 and nums[i+1] == 2:
5+
return True
6+
return False

0 commit comments

Comments
 (0)