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

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

2
  • Would you expect bool('wrong') to be False…? Commented Nov 10, 2021 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. Commented Nov 10, 2021 at 13:59

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.