title: Runtime of python's if substring in string
body: <p>What is the big O of the following <code>if statement</code>?</p>
  
  <pre><code>if "pl" in "apple":
     ...
  </code></pre>
  
  <p>What is the overall big O of how python determines if the string "pl" is found in the string "apple"</p>
  
  <p>or any other substring in string search.</p>
  
  <p>Is this the most efficient way to test if a substring is in a string? Does it use the same algorithm as <code>.find()</code>?</p>