Converting from a string to boolean in Python?
Posted
by Joan Venge
on Stack Overflow
See other posts from Stack Overflow
or by Joan Venge
Published on 2009-04-03T19:44:20Z
Indexed on
2010/04/29
11:07 UTC
Read the original article
Hit count: 438
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 a built in functionality, etc.
EDIT: The reason I asked this is because I learned int("string"), from here. I tried bool ("string") but always got True.
© Stack Overflow or respective owner