continue
continue
When this is used, it will jump to the next iteration of the loop. Unlike the break
keyword, this does not stop the loop completely.
import lib
vcc = supply("VCC")
gnd = dgnd()
at vcc
wire right 100
# Loop through an array of colors
for i in ["yellow", "red", "blue", "green", "purple"]:
# do not create red or green led!
if i == "red" || i == "green":
continue
add led(i)
wire right 100
add res(10k)
wire right 100 down 100
to gnd