+ 1
Anyone can help me with this?
#py a= "False" b="True" if bool(a)==bool(b): print(bool(a)) print(bool(b))
3 Answers
+ 2
Boolean value of a string will be False only if your string is empty. This applies to lists, tuples, dictionaries, sets too.
+ 1
Surkhab Khan You've used the string data type instead of the boolean data type, which doesn't include the quotes. Any value other than None (which includes ""), False or 0 returns True. Try using them without the quotes.