I have a simple question about the bind()
method and the command
argument.
Usually, in a program, you can click on a button related to what you are doi
The normal way to share a function between a button and a binding is to make the event parameter optional, and to not depend on it. You can do that like this:
def search(event=None):
...
bttn = Button(..., command=search)
...
entr.bind('<Return>', search)
If you omit the command
and rely on a bound event, you lose the built-in keyboard accessibility that Tkinter offers (you can tab to the button and press the space bar to click it).