Grouping Information in Arrays, Loops, and Dictionaries
In Chapter 2, we learned about the all-important basics of programming: variables and control flow. Although these building blocks may seem rudimentary and limiting, they are already Turing-complete, meaning you can create any program you’ve ever used with them. I’m not saying that you should or that it would be easy, but you could.
In this chapter, we’ll learn about new data structures and more advanced control flows to make our lives easier when dealing with large quantities of data. First, we’ll see how arrays can help us create lists of data. Then, we’ll learn all about loops, a very powerful control flow structure to execute code blocks multiple times instead of just once. Lastly, we’ll learn about dictionaries, a data structure that helps us group other pieces of data in little packages.
In this chapter, we will cover the following main topics:
- Arrays
- Loops ...