  <span class="k">while</span> <span class="n">first</span> <span class="o">&lt;=</span> <span class="n">last</span><span class="p">:</span>
            <span class="n">mid</span> <span class="o">=</span> <span class="p">(</span><span class="n">first</span> <span class="o">+</span> <span class="n">last</span><span class="p">)</span> <span class="o">&gt;&gt;</span> <span class="mi">1</span>
            <span class="k">if</span> <span class="n">List</span><span class="p">[</span><span class="n">mid</span><spa