def new_file():
    return "Create a new file"

def open_file():
    return "Open file ..."

def save_file():
    return "Save file"

def quit_file():
    print("Quit Editor")
    quit()


if __name__ == "__main__":

    actions = {
        'n': new_file,
        'p': open_file,
        's': save_file,
        'q': quit_file
    }
    
    ch = input("Command (n-new, p-open, s-save, q-quit):")

    if ch in actions:
        res = actions[ch]()
        print(f"action:{res}")
    else:
        print(f"Unknown Command: {ch}")

    print("--- ---")
e3a45dccba7271565bc0eb4af4ce4f86cb48bac2
<mask token>


def save_file():
    return 'Save file'


def quit_file():
    print('Quit Editor')
    quit()


<mask token>

<mask token>


def open_file():
    return 'Open file ...'


def save_file():
    return 'Save file'


def quit_file():
    print('Quit Editor')
    quit()


<mask token>

def new_file():
    return 'Create a new file'


def open_file():
    return 'Open file ...'


def save_file():
    return 'Save file'


def quit_file():
    print('Quit Editor')
    quit()


<mask token>

def new_file():
    return 'Create a new file'


def open_file():
    return 'Open file ...'


def save_file():
    return 'Save file'


def quit_file():
    print('Quit Editor')
    quit()


if __name__ == '__main__':
    actions = {'n': new_file, 'p': open_file, 's': save_file, 'q': quit_file}
    ch = input('Command (n-new, p-open, s-save, q-quit):')
    if ch in actions:
        res = actions[ch]()
        print(f'action:{res}')
    else:
        print(f'Unknown Command: {ch}')
    print('--- ---')

def new_file():
    return "Create a new file"

def open_file():
    return "Open file ..."

def save_file():
    return "Save file"

def quit_file():
    print("Quit Editor")
    quit()


if __name__ == "__main__":

    actions = {
        'n': new_file,
        'p': open_file,
        's': save_file,
        'q': quit_file
    }
    
    ch = input("Command (n-new, p-open, s-save, q-quit):")

    if ch in actions:
        res = actions[ch]()
        print(f"action:{res}")
    else:
        print(f"Unknown Command: {ch}")

    print("--- ---")