Python string function to strip the last comma
<p>Input</p>

<pre><code>str = 'test1,test2,test3,'
</code></pre>

<p>Ouput </p>

<pre><code>str = 'test1,test2,test3'
</code></pre>

<p>Requirement to strip the last occurence of ','</p>
