from machine import Pin
led = Pin(2,Pin.OUT) # create output pin on GPIO2
button = Pin(13,Pin.IN) # create input pin on GPIO13
while True:
button_state = button.value() # read button state
led.value(button_state) # set the LED state according to push button state