Lists and For Loops
Building on what was taught in the Programming in Python mission, you will continue to build and refine your Python programming skills by learning to work with lists in Python, and learn the basics and syntax of Python for loops to analyze data so you can build your confidence in using Python for data science.
In this mission, you’ll learn concepts such as data structure in Python — known as a list —to organize your data, making it easily retrievable. You’ll also learn how to retrieve data from a list, slicing a list, Python for loops, and how to compute the average using for loops. For loops are important and super awesome because they loop through an iterable object (like a list, tuple, set, etc.) and perform the same action for each entry. For example, a for loop would allow us to iterate through a list, performing the same action on each item in the list.
Upon completion of this mission, you’ll feel more confident in your Python programming ability. If you feel like you need practice, think of something you can create using what you’ve learned so far — it doesn’t have to be big, it can be something small, like a calculator. Or if you feel like you need more practice with Python for loops (it’s a tough concept to grasp), check out this tutorial explaining the basics of for loops
- Learn to work with list in Python.
- Learn to work with lists of lists in Python.
- Learn to use Python to open a data set stored on a file.
- Learn to analyze data using Python for loops.
- Negative Indexing
- Retrieving Multiple List Elements
- List Slicing
- List of Lists
- Opening a File
- Repetitive Processes
- For Loops
- The Average App Rating
- Alternative Way to Compute an Average
- Next Steps