def yes_or_no(question):
    """ Ask the user a yes or no question. Returns True for yes, False for no """
    suffix = " (y/n)? > "
    question = question.rstrip()
    answer = input(question + suffix).lower().strip()
    if answer in ["y", "ye", "yes"]:
        return True
    elif answer in ["n", "no"]:
        return False
    else:
        print("Please answer with 'y' or 'n'\n")
        return yes_or_no(question)