What is difference between if (False,) and True == (False,)
<p>I learned python 3 last year, but I have barely experience.</p>

<p>I am reviewing about tuple again.</p>

<p>I would like to figure out difference between  <code>if (False,)</code> and <code>True == (False,)</code></p>

<p>Since <code>if (False,):</code> is true, but <code>True == (False,)</code> is false, I am very confused.</p>

<p>Perhaps this highlights the difference. </p>

<p><code>if (False,):</code> will <em>evaluate</em> because a non-empty tuple is a truth-y value. It is not true itself. And comparing a tuple against a boolean shouldn't be expected to return true in any case, regardless of the content of said tuple. </p>

<pre><code>t = (False,)

print(bool(t)) # True
print(t == True) # False
print(bool(t) == True) # True
</code></pre>

python tuples