main = Tk() def clickEvent: #insert code that will execute here lb = Listbox(main) lb.bind('<<ListboxSelect>>', clickEvent)