def get_input(question, response_format, error_message):
    """ loops until a response that is in response_format is met"""
    while True:
        res = input(question)
        if res in response_format:
            return res
        print(error_message)
