Python Nested Data Exercises

Let’s check out some exercises that will help understand Nested Data better.

Exercise 6-a

Print 5 by accessing the nested data.


You can chain the bracket notation: [][][] to access the element you need.

ans_1 = nested_lst[1][1]

Exercise 6-b

Print "Z" from the nested data.


You can chain the bracket notation: [][][] to access the element you need.

ans_1 = nested_lst[1][1][0]