to my knowledge, if you input any text it will return true and if you input nothing it will return false. if it’s possible without if statements, how do i check if they inputted ‘True’ or 'False (/ ‘1’ or ‘0’) when im doing ‘bool(input("Input True or False ")’.
If you’re asking homework questions online you should really step up your game. ChatGPT is how all the cool kids are cheating on their homework and that doesn’t require waiting on replies.
This stackoverflow answer has a whole bunch of approaches you can try.
bool
doesn’t work because it uses the standard truth testing algorithm in Python:In other words,
bool(string)
checks if your string has a length of 0 or is any of the other falsy types, and everything else is True.