Possible Duplicate:
Why does “[] == False” evaluate to False when “if not []” succeeds?
How is this possible that logical test a==True produces False, but if a: works? Please see code below
>>> a = bin(0)
>>> if a:
print a == True, 'HOWWWW???????'
False HOWWWW???????
>>> type(a)
<type 'str'>
>>>