def ask_yes_no(*question: Token, default: bool = False) -> bool:
while True:<EOL><INDENT>tokens = [green, "<STR_LIT>", reset] + list(question) + [reset]<EOL>if default:<EOL><INDENT>tokens.append("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>tokens.append("<STR_LIT>")<EOL><DEDENT>info(*tokens)<EOL>answer = read_input()<EOL>if answer.lower() in ["<STR_LIT:y>", "<STR_LIT:yes>"]:<EOL><INDENT>return True<EOL><DEDENT>if answer.lower() in ["<STR_LIT:n>", "<STR_LIT>"]:<EOL><INDENT>return False<EOL><DEDENT>if not answer:<EOL><INDENT>return default<EOL><DEDENT>warning("<STR_LIT>")<EOL><DEDENT>
Ask the user to answer by yes or no