def func(event): print("You hit return.") root.bind('', func)
Here is what the above code is Doing:
1. We create a function called func.
2. We bind the function to the event
3. When the user hits the return key, the function func is called.
def func(event): print("You hit return.") root.bind('', func)
Here is what the above code is Doing:
1. We create a function called func.
2. We bind the function to the event
3. When the user hits the return key, the function func is called.