<bool> = <str>.startswith(<sub_str>) <spanclass="hljs-comment"># Pass tuple of strings for multiple options.</span>
<bool> = <str>.startswith(<sub_str>) <spanclass="hljs-comment"># Pass tuple of strings for multiple options.</span>
<bool> = <str>.endswith(<sub_str>) <spanclass="hljs-comment"># Pass tuple of strings for multiple options.</span>
<bool> = <str>.endswith(<sub_str>) <spanclass="hljs-comment"># Pass tuple of strings for multiple options.</span>
<int> = <str>.find(<sub_str>) <spanclass="hljs-comment"># Returns start index of first match or -1.</span>
<int> = <str>.find(<sub_str>) <spanclass="hljs-comment"># Returns start index of first match or -1.</span>
<int> = <str>.index(<sub_str>) <spanclass="hljs-comment"># Same but raises ValueError.</span>
<int> = <str>.index(<sub_str>) <spanclass="hljs-comment"># Same but raises ValueError if missing.</span>
</code></pre>
</code></pre>
<pre><codeclass="python language-python hljs"><str> = <str>.replace(old, new [, count]) <spanclass="hljs-comment"># Replaces 'old' with 'new' at most 'count' times.</span>
<pre><codeclass="python language-python hljs"><str> = <str>.replace(old, new [, count]) <spanclass="hljs-comment"># Replaces 'old' with 'new' at most 'count' times.</span>
<bool> = <str>.isnumeric() <spanclass="hljs-comment"># True if str contains only numeric characters.</span>
<bool> = <str>.isnumeric() <spanclass="hljs-comment"># True if str contains only numeric characters.</span>