look at madlib py againsee how we have used most of the ideas so far if you want more descriptionyou might look at section sample programexplained (page again (or for the first time)it should make much more sense now we will use madlib py as basis for more substantial modifications in structure in the revised mad lib program (page mad lib exercise to confirm your better understanding of madlib pyload it in the editorrename it as mymadlib pyand modify it to have less lame storywith more and different entries in the dictionary make sure addpick is called for each key in your format string test your version dictionaries and python variables dictionaries are central to the implementation of python each variable identifier is associated with particular value these relationships are stored in dictionaries in pythonand these dictionaries are accessible to the useryou can use the function call locals(to return dictionary containing all the current local variables names as keys and all their values as the corresponding dictionary values this dictionary can be used with the string format methodso you can embed local variable names in format string and use them very easilyfor examplerun the example program arithdict py '''fancier format string examplewith locals('' sum prod formatstr '{ { {sum}{ { {prodequations formatstr format(**locals()print(equationsnote the variable names inside braces in formatstrand the dictionary reference used as the format parameter is **locals( string like formatstr is probably the most readable way to code the creation of string from collection of literal strings and program values the ending part of the syntaxformat(**locals())may appear bit strangebut it is very usefulit clearly indicate how values are embedded into the format stringand avoids having long list of parameters to format the example program hello_you py does the same thing as the earlier hello_you versionsbut with dictionary reference'''hello to you''illustrates locals(for formating in print person input('enter your name'greeting 'hello{person}!format(**locals()print(greetingf-strings(optionalbut handy! simplification for formatting added in python is -strings they have many featuresbut the simplest thing is to shorten formatting of literal string with local variable references like abovemerely add an immediately before the literal format stringand eliminate the format(**locals()see example arithfstring py beginning with python