Chapter 32 Tips and Tricks with Data Structures

32.1 Introduction

Since lists are handled with the same sequence, decision, and loop control structures that you learned about in previous chapters, there is no need to repeat all of that information here. However, what you will discover in this chapter is how to process each row or column of a two-dimensional list individually, how to solve problems that require the use of more than one list, how to create a two-dimensional list from a one-dimensional list (and vice versa), and some useful built-in list functions and methods that Python supports.

32.2 Processing Each Row Individually

Processing each row individually means that every row is processed separately and the result of each row (which ...

Get Python and Algorithmic Thinking for the Complete Beginner now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.