How can I check that a list has one and only one True value?
<p>In python, I have a list that should have <strong>one and only one</strong> true value. Is there a clever way to check for this? Right now, I am just iterating across the list and manually checking:</p>

<pre><code>def only1(l)
    true_found = False
    for v in l:
        if v and not true_found:
            true_found=True
        elif v and true_found:
             return False #"Too Many Trues"
    return true_found
</code></pre>

<p>This seems inelegant and  not very pythonic. Is there a cleverer way to do this? </p>
