from time import sleep import gpiozero as GP l = GP.LED(18) l.off() while True: l.on() sleep(1) l.off() sleep(1)