Recommended · for beginners
Simple Button Input with the Raspberry Pi
Why people recommend it
A classroom-style walkthrough of reading a push button on Raspberry Pi GPIO, covering pull-up versus pull-down wiring before the Python code.
Watch for: skip ahead if you only want the code