def yes_or_no(question):
    """ Returns True for yes or False for no """

    yes_answer = ['y', 'yes']
    no_answer = ['n', 'no']
    while True:
        user_input = input(question + ' [Y/n] ').lower()
        if user_input in yes_answer:
            return True
        elif user_input in no_answer:
            return False
        else:
            print('Answer with yes or no.')