title: Determine if there are two 2's next to each other in an array
body: <p>Example output:</p>
  <pre><code>has22([1, 2, 2]) → True
  
  has22([1, 2, 1, 2]) → False
  
  has22([2, 1, 2]) → False
  </code></pre>
  <p>My code:</p>
  <pre><code>def has22(nums):
  
      for x in range(0, len(nums)):
          if nums[x] == 2 and (nums[x+1] == 2):
              return True
      return False 
  </code></pre>
  <p>#Output: list index out of range</p>