def int_from_bool_as_string(subject):
 return ((bool_from_string(subject) and 1) or 0)

def int_from_bool_as_string ( subject ) : return ( ( bool_from_string ( subject ) and 1 ) or 0 )
interpret a string as a boolean and return either 1 or 0 .