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
Using dicts to convert "True" in True:
def str_to_bool(s: str): status = {"True": True, "False": False} try: return status[s] except KeyError as e: #logging