def ask(question, default=True):
    """Ask yes-no question, fallback to yes if `default` is set."""
    question += ' [O/n] ' if default else ' [o/N] '
    ans = input(question).strip().lower()
    if ans == 'o':
        return True
    elif ans == 'n':
        return False
    else:
        return default