boolean expression doesn't match
<p>I having a simple issue which I don't seem to understand why,<code>force_edl</code> variable value is 'False" (its an option to my python script and user enters True or False)but the conditions <code>if force_edl == False:</code> and            <code>if not force_edl</code> doesnt seem to match,how do I debug this problem?below code always goes to else part...is there way to strip bool values?</p>

<pre><code>        print "force_edl " + force_edl //prints false
        if force_edl == False:
        #if not force_edl
             print "False"
        else:
             print "True"
</code></pre>

<p><strong>You cannot concatenate 'str' and 'bool'.</strong> So if this</p>

<pre><code>print "force_edl " + force_edl 
</code></pre>

<p>is not giving you an error <em>then your force_edl is definitely not a bool.</em> </p>

<p>That's why <strong>your if prints True</strong>. </p>

<pre><code>force_edl = False

if force_edl == False:
    print "FALSE"
else:
   print "TRUE"
</code></pre>

<p>Above corrected snippet will definitely print False. </p>

<p>Do let me know if this clears your doubt. </p>

python