str2bool

Convert string to boolean


Keywords
str2bool
License
BSD-3-Clause
Install
pip install str2bool==1.1

Documentation

str2bool v.1.1

About

Convert string to boolean. Library recognizes "yes", "true", "y", "t", "1" as True, and "no", "false", "n", "f", "0" as False. Case insensitive.

Installation

$ pip install str2bool

Examples

Here's a basic example:

>>> from str2bool import str2bool
>>> print(str2bool('Yes'))
True

License

BSD