dictionaries and strings true deleting an element of dictionary is done exactly the same way as with listsusing the operator deland we can use len to check its lengthdel temps['oslo'remove oslo key and value temps {'paris' 'london' 'madrid' len(tempsno of key-value pairs in dict in some casesit can be useful to access the keys or values of dictionary as separate entitiesand this can be accomplished with the methods keys and valuesfor instance temps keys(and temps values(for the case above these methods will return iteratorswhich are list-like objects that can be looped over or converted to listfor temp in temps values()print(temp keys_list list(temps keys()just as with listswhen we assign an existing dictionary to new variablethe dictionary is not copied insteadthe new variable name becomes reference to the same dictionaryand changing it will also change the original variable the following code illustrates the behaviort temps ['stockholm' change temps temps is also changed{'stockholm' 'paris' 'london' 'madrid' temps copy(take copy ['paris' ['paris' was not changed herethe call to temps copy(ensures that is copy of the original dictionaryand not referenceso changing it does not alter the original dictionary recall that lists behave in the same wayl [ [ [ copy(#for listsm [: [ [ also works