<pre><codeclass="python language-python hljs"><str> = <str>.replace(old, new [, count]) <spanclass="hljs-comment"># Replaces 'old' with 'new' at most 'count' times.</span>
<str> = <str>.translate(<table>) <spanclass="hljs-comment"># Use `str.maketrans(<dict>)` to generate table.</span>
<list> = textwrap.wrap(<str>, width) <spanclass="hljs-comment"># Nicely breaks string into lines.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><str> = chr(<int>) <spanclass="hljs-comment"># Converts int to unicode char.</span>
<int> = ord(<str>) <spanclass="hljs-comment"># Converts unicode char to int.</span>