n>
                    <span class="k">if</span> <span class="n">pair</span><span class="o">.</span><span class="n">quantity</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
                        <span class="n">revisedTransaction</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">pair</span><span class="p">)</span>
            <span class="n">revisedTransaction</span><span class="o">.</span><span class="n">sort</span><spa