How to apply a logical operator to all elements in a python list
<p>I have a list of booleans in python. I want to AND (or OR or NOT) them and get the result. The following code works but is not very pythonic.</p>

<pre><code>def apply_and(alist):
 if len(alist) &gt; 1:
     return alist[0] and apply_and(alist[1:])
 else:
     return alist[0]
</code></pre>

<p>Any suggestions on how to make it more pythonic appreciated.</p>
