title: Algorithm complexity: if/else under for loop
body: <p>I am wondering if in a situation like the following (an if/else statement under a for loop) the complexity would be O(n) or O(n^2):</p>
  
  <pre><code>for character in string:
      if character==something:
          do something
      else:
          do something else.
  </code></pre>
  
  <p>Thank you!</p>