There is another way to provide list. Such operation is needed sometimes when we need to process the data of dataframe created earlier for that purpose, we need this type of computation so we can process the existing data and make a separate column to store the data. brightness_4 Using range to create a list of int values. I appreciate the support! Attention geek! Luckily, Python supports and easy-to-use data structure for storing all kinds of data: the list. with the counters and returned object will be an enumerate. For instance, we could get any of the following information: If you’re interested in articles on list interaction, I’ve written a thing or two: Otherwise, let’s look at a few other solutions. In this tutorial, we will learn, For Loop Syntax and Examples ; For Loop over a list ; For Loop over a matrix Feel free to use any solution from this article to generate your list. As always, I like to share a list of all the solutions for your perusal: And with that, all I ask is that you take a trip over to my post about different ways to support the site. For example, you might want to collect a list of exam scores, so you can average them. Right now, new subscribers will receive a copy of my Python 3 Beginner Cheat Sheet. Regardless of these differences, looping over tuples is very similar to lists. Loop Through a Dictionary. I also recommend using the right tool for the job but will suggest an alternative. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In Python, there is not C like syntax for(i=0; i