def custom(message, allowed, err='Invalid input.'):
    """Command line input and error checking for user-defined allowable inputs.

    Args:
        message (str): The input message displayed in the command line.
        allowed (tuple of (str,)): The allowable user inputs.
        err (str, optional): The message displayed for an erroneous input.
            Defaults to "Invalid input.".

    Returns:
        str: The first sucessfully allowed input string.
    """
    while True:
        data = input(message)
        data = data.strip()
        if data == '':
            print('Please provide an input.')
            continue
        if data in allowed:
            return data
        print(err)
