def yn_input(message, default='y'):
    """i/o: collect a yes/no answer from input"""
    choices = 'Y/n' if default.lower() in ('y', 'yes') else 'y/N'
    choice = input('{} ({}) '.format(message, choices))
    values = ('y', 'yes', '') if choices == 'Y/n' else ('y', 'yes')
    return choice.strip().lower() in values
