0
x = bool(input())
print(x)

Input: False
Output: True
Why is the output always True irrespective of the input?

martineau
  • 119,623
  • 25
  • 170
  • 301
  • Would you expect `bool('wrong')` to be `False`…? – deceze Nov 10 '21 at 13:47
  • `input()` gives string `"False"` and `bool(not_empty_string)` gives `True` - `bool()` doesn't check what text you have in this string. – furas Nov 10 '21 at 13:59

0 Answers0