<blockquote>
<p><strong>Possible Duplicate:</strong><br/>
<a href="https://stackoverflow.com/questions/3844801/check-if-all-elements-in-a-list-are-identical">check if all elements in a list are identical</a> </p>
</blockquote>
<p>我想检查一下列表中的所有元素是否相等。我不能这么做:</p>
<pre><code>if all (x == x for x in (a, b, c, d)):
...
</code></pre>
<p>在Python中有没有非常简单和优雅的方法来实现这一点?</p>