title: Sort a list of tuples with None values in Python3
body: <blockquote>
    <p>In Python 3 the ordering comparison operators (&lt;, &lt;=, >=, >) raise a
    TypeError exception when the operands don’t have a meaningful natural
    ordering</p>
  </blockquote>
  
  <p>This change in comparison creates difficulties to order a list of tuples, if there exist None values.</p>
  
  <p><strong>In Python 2:</strong></p>
  
  <pre><code>&gt;&gt;&gt; unordered_list = [('3', '1', None), ('3','1', '4'), ('3', '1', None)]
  &gt;&gt;&gt; sorted(unordered_list, reverse=True)
  
  [('3', '1', '4'), ('3', '1', None), ('3', '1', None)]
  </code></pre>
  
  <p><strong>In Python 3:</strong></p>
  
  <pre><code>&gt;&gt;&gt; unordered_list = [('3', '1', None), ('3','1', '4'), ('3', '1', None)]
  &gt;&gt;&gt; sorted(unordered_list, reverse=True)
  
  TypeError: unorderable types: str() &lt; NoneType()
  </code></pre>
  
  <p>Do you have any idea how to have the same behavior with Python 2 an elegant way?</p>
  
  <p><strong>NOTE:</strong> In the above examples I have integers, but it's only an example. The elements of the tuples will have the same type and they could be any type.</p>
  
  <pre><code>ex.2 [('test3','test1', 'test4'), ('test3', 'test1', None)]
  ex.3 [( 3, 1, 4), (3, 1, None)]
  ex.4 [( 3.1, 1.1, 4.1), (3.1, 1.1, None)]
  </code></pre>