There's more...

The interface for interacting with the push button in Python is very straightforward. Essentially, it translates to a Boolean value, which you can inspect at any time during your script execution in order to check the current state of the button.

This polling model of repeatedly checking the button state works well in simple scenarios. However, it proves to be problematic when you want to perform a single action for each button press, as opposed to continually pressing the button. This is similar to how you would expect to interact with a keyboard on a desktop. In this scenario, you expect that one physical key press will translate into an action being applied once. On the other hand, a physical key press that is held down for an extended period of time usually produces repeated key actions.

On most operating systems, a delay of 500 milliseconds or so is applied before the key is released, where it is considered as a repeat key action. It is important to bear these details in mind when you are trying to implement code that interacts with the push buttons in a natural and intuitive way.