How to chain if else elegantly
<p>I have an odd piece of code.  It's smelly but I can't think of way to make if more clear.</p>

<p>What I'm trying to do is remove the largest item from either the tail of the left list or the head of right list.  I ended up with this code.</p>

<pre><code>if not left:
  right.pop(0)
elif not right:
  left.pop(-1):
elif len(left[-1]) &lt; len(right[0]):
  right.pop(0)
else:
  left.pop(-1)
</code></pre>

<p>The bodies of the conditions are exact duplicates of each other, yuck.</p>

<p>Is there an elegant way to restructure this code to minimize duplication?</p>
