main(this code illustrates several things about functions firstlike whole filesfunctions can have documentation string immediately after the definition heading it is good idea to document the return valuethe dictionary that is created is returnedbut the local variable name in the functionspanishis lost when the function terminates to remember the dictionary returned to mainit needs name the name does not have to match the name used in createdictionary the name dictionary is descriptive we could also use the dictionary more extensively the example program spanish py is the same as above except it has the following main methoddef main()dictionary createdictionary(print('count in spanishdictionary['one''dictionary['two''+dictionary['three'''print('spanish colorsdictionary['red''dictionary['blue''+dictionary['green'''try itand check that it makes sense python dictionaries are actually more general than the common use of dictionaries they do not have to associate words and their string definitions they can associate many types of objects with some arbitrary object the more general python terminology for word and definition are key and value given keyyou can look up the corresponding value the only restriction on the key is that it be an immutable type this means that value of the key' type cannot be changed internally after it is initially created strings and numbers are immutable dictionary is mutableits value can be changed internally (you can add new definitions to it!we will see more mutable and immutable types later and explore more of the internal workings of data types number dictionary exercise write tiny python program numdict py that makes dictionary whose keys are the words 'one''two''three'and 'four'and whose corresponding values are the numerical equivalents and (of type intnot stringsinclude code to test the resulting dictionary by referencing several of the definitions and printing the results (this dictionary illustrates simply that the values in python dictionary are not required to be strings dictionaries and string formatting at the end of the main function in spanish py from the last sectiontwo strings are constructed and printed the expressions for the two strings include sequence of literal strings concatenated with interspersed values from dictionary there is much neatermore readable way to generate these strings we will develop this in several steps the first string could be constructed and printed as followsnumberformat 'count in spanish{one}{two}{three}withsubstitutions numberformat format(one='uno'two='dos'three='tres'print(withsubstitutionsthere are several new ideas herewe are using an alternate form of format string and format method parameters from those described in string format operation (page beginning with python