def tobool(ans):
    """Takes "Yes"/"No" or "True"/"False" and returns boolean True or False.

    Parameters
    ----------
    ans : string
        "Yes"/"No" or "True"/"False".
    Returns
    -------
    boo : {True, False}
    """
    ans = ans.lower()

    if 'y' in ans or 't' in ans:
        boo = True
    elif 'n' in ans or 'f' in ans:
        boo = False
    else:
        boo = None

    return boo