Does anyone know how to do convert from a string to a boolean in Python? I found this link. But it doesn’t look like a proper way to do it. I.e. using built-in functionality, etc.
The reason I’m asking this is because I learned about int("string")
from here. But when trying bool("string")
it always returns True
:
>>> bool("False")
True