title: capitalize every other letter in a string
body: <p>This is my code:</p>
  
  <pre><code>def mock(s):
      ret = ""
      i = True  
      for char in s:
          if i:
              ret += char.upper()
          else:
              ret += char.lower()
          if char != ' ':
              i = not i
      return ret
  print(mock("abcd efgh ijkl"))
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>AbCd EfGh IjKl
  </code></pre>
  
  <p>but it has to be like this:</p>
  
  <pre><code>AbCd eFgH IjKl
  </code></pre>
  
  <p>I don't get what i'm doing wrong and what I should do to fix it.</p>