def input_choice(prompt, choice=("y", "n")):
    """
    Print a prompt on the command line and wait for a choice.

    Parameters:
         prompt (str): prompt string
         choice (tuple of str, optional): candidate choices
    """
    prompt = "%s (%s)" % (prompt, "/".join(choice))
    choice = set([c.lower() for c in choice])
    result = input(prompt)
    while result.lower() not in choice:
        result = input(prompt)
    return result