def str2bool(str):
    """Tells whether a string is a Yes (True) or a No (False)"""
    if str.lower() in ["y", "yes"]:
        return True
    elif str.lower() in ["n", "no"]:
        return False
    else:
        raise Exception("Please enter Yes or No")