Answers for "2d dictionary in python"

1

python 2d dictionary

please subscribe my channel - https://bit.ly/2Me2CfB
import PyDictionary

print("\n----------------DICTIONARY----------------\n")

word = input("ENTER WORD : ")

meaning = PyDictionary.PyDictionary.meaning(word)

print("MEANING :", meaning)
Posted by: Guest on February-25-2021
0

2d dictionary in python

# It would have the following syntax
dict_names = {'d1' : {'name':'bob', 'place':'lawn', 'animal':'man'},
              'd2' : {'name':'spot', 'place':'bed', 'animal':'dog'}}

# You can then look things up like
>>> dict_names['d1']['name']
'bob'
Posted by: Guest on August-31-2021

Python Answers by Framework

Browse Popular Code Answers by Language