Nested List

say it: “NES-tid LIST” /ˈnɛstɪd lɪst/

A list inside another list, like rows and columns.

What is a nested list?

A nested list is a list inside another list, handy for rows and columns like a seating chart or a game board.

seats = [["A1", "A2"], ["B1", "B2"]]
print(seats[1][0])  # B1

Level: Apprentice · More Python terms at this level

Updated