def question(message, default='', required=False):
    """
    Ask a question to the user

    Args:
        message (str): message to display
        default (str): the default value
        required (bool): if True, loop to get an answer

    Returns:
        str: user's value
    """
    while True:
        if default != '':
            message += f' [{default}] '
        elif not message.endswith(' '):
            message += ' '
        answer = input(message)
        if answer == '':
            answer = default
        if answer != '':
            break
        elif required is False:
            break
    return answer
