Use the modulo operator % to loop through a number range, in this example to set NeoPixel LED colors.
To learn about CircuitPython: https://circuitpython.org
Visit the Adafruit shop online - http://www.adafruit.com
LIVE CHAT IS HERE! http://adafru.it/discord
Adafruit on Instagram: https://www.instagram.com/adafruit
Subscribe to Adafruit on YouTube: http://adafru.it/subscribe