title: problem: how to verify affiliation of object in the collection of objects
body: <p>I have a collection of objects. Objects are instance of the same class. I need to verify that the variable <code>reviewed_object_name</code> occurs in the <code>object_name</code> field of any object in the collection.</p>
  
  <p>When I have a simple collection the solution is obvious:</p>
  
  <pre><code>reviewed_object_name = "Hotel Roma"
  reviewed_objects_collection = ["Hotel Roma", "Hotel Berlin", "Hotel Paris", "Hotel Madrit"]
  
  reviewed_object_name in reviewed_objects_collection
  </code></pre>
  
  <p>expression returns True</p>
  
  <p>The problem arises when I have a collection of objects</p>
  
  <p>I tried to do this using lambda:</p>
  
  <pre><code>some_function (reviewed_objects_collection, key = lambda review_object_info: review_object_info.name)
  </code></pre>
  
  <p>What function would be able to give me this information?</p>