Read positions in a nested list
In Listing 1, four variables named a, b, c, and d are read from a nested list. The first index selects a row and the second index selects a column.
TipHint
In row[::-1], the slice [::-1] makes a new list with the items in reverse order. Python’s built-in reversed(row) visits the same items from last to first; list(reversed(row)) also makes a reversed list.
What values do a, b, c, and d contain?
a = 3,b = 7,c = 6, andd = [6, 5, 4].a = 7,b = 3,c = 9, andd = [6, 5, 4].a = 7,b = 3,c = 8, andd = [6, 5, 4].a = 7,b = 3,c = 8, andd = [4, 5, 6].