from machine import Pin
import time

led = Pin(5, Pin.OUT)
button = Pin(6, Pin.IN, Pin.PULL_DOWN)

while True:
    if button.value():
       led.on()
       time.sleep(0.5)
       if button.value():
         led.off()
         time.sleep(0.5)
            
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT