What is the syntax to retrieve values from multi-dimensional arrays?

<array name>[<dim1_index>][<dim2_index>]..etc
#example
wardrobe = [['shirt','pants','hat'],['green','white','rose','black']]
print(wardrobe[0][0])
print(wardrobe[1])
print(wardrobe[1][3])

#output
shirt
['green', 'white', 'rose', 'black']
black

 

 

Advertisements