Python Remove last char from string and return it
<p>While I know that there is the possibility:</p>

<pre><code>&gt;&gt;&gt; a = "abc"
&gt;&gt;&gt; result = a[-1]
&gt;&gt;&gt; a = a[:-1]
</code></pre>

<p>Now I also know that strings are immutable and therefore something like this:</p>

<pre><code>&gt;&gt;&gt; a.pop()
c
</code></pre>

<p>is not possible.</p>

<p>But is this really the preferred way?</p>
