title: The fastest way to find correspondence in two lists Python
body: <p>Suppose I have a list <code>lst1</code> of objects that have attribute <code>from_id</code>. Also, I have another list <code>lst2</code> of objects that have attribute <code>to_id</code>.</p>
  
  <p>I need to find for each object in <code>lst1</code> its "pair" in <code>lst2</code> (<code>from_id</code> should equal <code>to_id</code>).</p>
  
  <p>There can be at most one object (zero or one) from <code>lst2</code> that corresponds to the given object from <code>lst1</code>.</p>
  
  <p>What is the fastest way to achieve it in python?</p>