Python tkinter combobox, how can I select dictionary key and print corresponding value? Python tkinter combobox, how can I select dictionary key and print corresponding value? tkinter tkinter

Python tkinter combobox, how can I select dictionary key and print corresponding value?


Does changing your function to this, help you?

def submit_button():    key1 = paper1_chosen.get()    key2 = paper2_chosen.get()    print(Paper_sizes[key1])    print(Paper_sizes[key2])

Nothing much is happening inside, all thats happening is that you are taking the key from the combobox selection and printing out the corresponding value pair.

Hope you understood, let me know if you have more doubts.

Cheers