Join stepper motor and button code.

But is this the proper way to do it?

No, it isn't. Hold that switch down. Does the stepper stop after one step? No, it does not. It steps as long as the switch is held down.

How many times does that for loop iterate?

Why are you using a for loop to iterate once?