Guest User

Untitled

a guest
Dec 10th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def has22(nums):
  2. for i in range(len(nums) - 1):
  3. if nums[i] == 2 and nums[i+1] == 2:
  4. return True
  5. return False
  6.  
  7. print has22([1,2,2])
  8. print has22([1,2,1,2])
Add Comment
Please, Sign In to add comment