
In programming, for loops are incredibly versatile tools to repeat a section of code. For loops can loop for a set number of times using a range, they can have clauses / conditions which will end the loop and we can use them to iterate over items in a dictionary, list or tuple.
In this how to, we will show you how to get started with for loops using Python, the same syntax will also work with MicroPython and CircuitPython on boards such as the Raspberry Pi Pico.