title: TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'
body: <p>I'm trying to sort a list of ints in python this is my code</p>
  
  <pre><code>for i in range (5):
       for j in range (6):
           list_dist.append(dist(i,j,pos_porte))
  sorted_list=sorted (list_dist)
  </code></pre>
  
  <p>for some reason it doesn't work can you help?</p>
  
  <p>Edit: dist is a function that returns distance:</p>
  
  <pre><code>def dist(a,s,b):
       distance=sqrt((pow(a-b[0],2)+pow(s-b[1],2)))
       print(distance)
  </code></pre>