Jupyter Notebook on Google Colab: https://tinyurl.com/5awxwpn3
(Bioinfo track: https://tinyurl.com/yckxbptr )
The "for" loop allows you to run a section of code a given number of times; a variable within the code takes on a different value at each iteration.
Embedded video, part of the following courses:
Computer Programming at Queen Mary, University of London
Coding for Scientists at Queen Mary, University of London
For the full context, see the notebooks linked above.