5 lines
158 B
Python
5 lines
158 B
Python
|
def toBool(thing: any) -> bool:
|
||
|
if type(thing) == str:
|
||
|
return thing.lower() in ["yes", "true", "on", "one", "1", "y", "t"]
|
||
|
return bool(thing)
|