2d dictionary in python

Solutions on MaxInterview for 2d dictionary in python by the best coders in the world

showing results for - "2d dictionary in python"
Naima
27 May 2020
1# It would have the following syntax
2dict_names = {'d1' : {'name':'bob', 'place':'lawn', 'animal':'man'},
3              'd2' : {'name':'spot', 'place':'bed', 'animal':'dog'}}
4
5# You can then look things up like
6>>> dict_names['d1']['name']
7'bob'