import config import database_menu import question_answer_output # Main Menu def main_menu(): enable_menu = True selection = {0: 'Datenbank Menü', 1: 'Zufallsfrage', 2: 'Programm beenden\n'} print('# Main Menü #\n') while enable_menu: for key, value in selection.items(): print(key, value) selection_number = int(input('Bitte Auswahl treffen\n')) match selection_number: case 0: database_menu.menu() break case 1: while True: question_answer_output.random_question(config.json_file) number = int(input('Zurück zum Hauptmenü\n 1: Ja \n 2: Nein\n')) if number == 1: break case 2: break