pythonic way of selecing a random value that satisfies a certain predicate
<p>Suppose I have a list of elements and I want to randomly select an element from the list that satisfies a predicate. What is the pythonic way of doing this? </p>

<p>I currently  do a comprehension followed by a <code>random.choice()</code> but that is unnecessarily inefficient :</p>

<pre><code>intlist = [1,2,3,4,5,6,7,8,9]
evenlist = [ i for i in intlist if i % 2 == 0 ] 
randomeven = random.choice(evenlist)
</code></pre>

<p>Thanks!</p>
