def prompt(msg='Proceed (%s)? ', choices=['y', 'n']):
    """
    Prompts user in the console with a message with specific choices to select from.

    :param msg: the message to display, use %s for inserting the allowed choices (format: a/b/c/...)
    :type msg: str
    :param choices: the list of allowed choices (must be strings)
    :type choices: list
    :return: the selected choice
    :rtype: str
    """
    act_msg = msg
    if '%s' in act_msg:
        act_msg = act_msg % '/'.join(choices)
    while True:
        retval = input(act_msg)
        if retval in choices:
            result = retval
            break
    return result
