so far we have used texts (string objectsas keysbut the keys of dictionary can be any immutable (constantobject for instancewe can use integersfloatsand tuples as keysbut not lists since they are mutable objectsd { key is int { 'oslo' 'london'possible {( , ) ( ,- ) key is tuple {[ , ] [- , ] list is mutable/changeable typeerrorunhashable type'listof coursethe fact that these alternatives work in python does not mean that they are recommended or very useful it isfor instancehard to imagine useful application for dictionary with temperature as the key and city name as the value strings are the most obvious and common data type for dictionary keys and will also be the most common through this book howeverthere are applications where other types of keys can be usefulas we see in the following examples examplea dictionary for polynomials the information in polynomial such as ( - can be represented by dictionary with the power as the key (intand the coefficient as the value (float or int) { - more generallya polynomial written on the form (xn ci xi ii for some set of integers can be represented by dictionary with keys and values ci to evaluate polynomial represented by such dictionarywe need to iterate over the keys of the dictionaryextract the corresponding valuesand sum up the terms the following function takes two arguments dictionary poly and number or array and evaluates the polynomial in xdef eval_poly_dict(polyx)sum for power in polysum +poly[power]* **power