title: Find object in list that has attribute equal to some value (that meets any condition)
body: <p>I've got a list of objects. I want to find one (first or whatever) object in this list that has an attribute (or method result - whatever) equal to <code>value</code>.</p>
  <p>What's the best way to find it?</p>
  <p>Here's a test case:</p>
  <pre><code>class Test:
      def __init__(self, value):
          self.value = value
  
  import random
  
  value = 5
  
  test_list = [Test(random.randint(0,100)) for x in range(1000)]
  
  # that I would do in Pascal, I don't believe it's anywhere near 'Pythonic'
  for x in test_list:
      if x.value == value:
          print &quot;i found it!&quot;
          break
  </code></pre>
  <p>I think using generators and <code>reduce()</code> won't make any difference because it still would be iterating through the list.</p>
  <p>ps.: Equation to <code>value</code> is just an example. Of course, we want to get an element that meets any condition.</p>