xxxxxxxxxx
#method 1
def string2bool(string):
string.lower() in ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']
#method 2
import json
def string2bool(string):
json.loads(string.lower())
#method 3 [check source for dependencies]
bool(distutils.util.strtobool(string))