<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 if missing.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><bool> = <str>.isdecimal() <spanclass="hljs-comment"># True if str contains only [0-9], [٠-٩], …</span>
<bool> = <str>.isdigit() <spanclass="hljs-comment"># Also true if str contains '¹²³…'.</span>
<bool> = <str>.isnumeric() <spanclass="hljs-comment"># Also true if str contains '¼½¾…'.</span>
</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>
<bool> = <str>.isnumeric() <spanclass="hljs-comment"># True if str contains only numeric characters.</span>
<list> = textwrap.wrap(<str>, width) <spanclass="hljs-comment"># Nicely breaks string into lines.</span>
xxxxxxxxxx