title: Getting a list of objects with same id from two list of objects
body: <p>Can anyone tell me an efficient way of getting a list of objects with same instance attribute say <code>id</code> from two different lists of objects?</p>
  
  <p>I am doing something like this:</p>
  
  <pre><code>[_update_obj_properties(orig_obj, new_obj, columns) 
      for new_obj in new_objs for orig_obj in orig_objs 
          if orig_obj.id == new_obj.id]
  </code></pre>
  
  <p>but I feel this is not very efficient.</p>