python 2d dictionary

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

showing results for - "python 2d dictionary"
Yohan
10 Feb 2018
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'