Appearance
将值转换为布尔类型
from usepy import to_bool
value
bool
>>> to_bool(True) True >>> to_bool("True") True >>> to_bool("true") True >>> to_bool("t") True >>> to_bool(0) False >>> to_bool("false") False