title: Detect what a python string begins with
body: <p>To detect whether a python string ends with a particular substring, say <code>&quot;.txt&quot;</code>, there is a convenient built-in python string method;</p>
  <pre><code> if file_string.endswith(&quot;.txt&quot;):
  </code></pre>
  <p>I would like to to detect whether a python string begins with a particular substring, say <code>&quot;begin_like_this&quot;</code>. I am not able find a convenient method that I can use like this;</p>
  <pre><code> if file_string.beginswith(&quot;begin_like_this&quot;):
  </code></pre>
  <p>I am using Python 3.6.</p>