spanish dict(spanish['hello''holaspanish['yes''sispanish['one''unospanish['two''dosspanish['three''tresspanish['red''rojospanish['black''negrospanish['green''verdespanish['blue''azulprint(spanish['two']print(spanish['red']first an empty dictionary is created using dict()and it is assigned the descriptive name spanish to refer to the definition for wordyou use the dictionary namefollow it by the word inside square brackets this notation can either be used on the left-hand side of an assignment to make (or remakea definitionor it can be used in an expression (as in the print functions)where its earlier definition is retrieved for examplespanish['hello''holamakes an entry in our spanish dictionary for 'hellowith definition 'holaprint(spanish['red']retrieves the definition for 'red'which is 'rojosince the spanish dictionary is defined at the top-levelthe variable name spanish is still defined after the program runsafter running the programuse spanish in the shell to check out the translations of some more wordsother than 'twoand 'redcreating the dictionary is well defined and quite different activity from the use of the dictionary at the end of the codeso we can use functions to encapsulate the task of creating the dictionaryas in the example program spanish pywhich gives the same result""" tiny english to spanish dictionary is createdusing the python dictionary type dict then the dictionary is usedbriefly ""def createdictionary()'''returns tiny spanish dictionary''spanish dict(spanish['hello''holaspanish['yes''sispanish['one''unospanish['two''dosspanish['three''tresspanish['red''rojospanish['black''negrospanish['green''verdespanish['blue''azulreturn spanish def main()dictionary createdictionary(print(dictionary['two']print(dictionary['red'] dictionaries