I\'m reading a True - False value from a file and I need to convert it to boolean. Currently it always converts it to True even if the value is set
True - False
True
You can do with json.
json
In [124]: import json In [125]: json.loads('false') Out[125]: False In [126]: json.loads('true') Out[126]: True