Example:
import tkinter as tk
root = tk.tk()
def func(key):
if key == 'a':
*run code*
elif key == 'b':
*run different code*
root.bind('a','b',func)
root.mainloop()
Basically, if the user hits 'a', something different happens than when they hit 'b'. I know how to do this with two functions, but is there any way to only use one?