title: Using lambda function as key in sort
body: <p>Can someone please explain how this code works. How the isisnstance function in the lambda function sorts the list</p>
  
  <pre><code>def db_sort(arr):
      return sorted(arr, key=lambda x: (isinstance(x,str) ,x))
  db_sort(['a', 'w', 'u', 'y', 6, 2, 3, 4, 5])
  </code></pre>
  
  <p>output:</p>
  
  <blockquote>
    <p>[2, 3, 4, 5, 6, 'a', 'u', 'w', 'y']</p>
  </blockquote>