def get_valid_input(question:str, validation_function) -> str:
    """
    Will get valid input from the user and return it.
    :param validation_function: python function object used to validate input
    """
    while True:
        inp = input(question).strip()
        if validation_function(inp): break
        else:
            print("Invalid input, please try again.")

    return inp