I am learning about nested iterations and I am wondering what is the best way to handle the following task for a large sample of iterations. More specifically, I came across