from machine import Pin
from time import sleep
btnPinList = [5, 19, 21]
ledPinList = [12, 26, 33]
btnList = [Pin(_, Pin.IN, Pin.PULL_UP) for _ in btnPinList]
ledList = [Pin(_, Pin.OUT) for _ in ledPinList]
while True:
for i in range(len(btnList)):
ledList[i].value(not btnList[i].value())
if not btnList[i].value():
print(i + 1)
sleep(0.1)