the dict data type can be called as functiondict()--with no arguments it returns an empty dictionaryand with mapping argument it returns dictionary based on the argumentfor examplereturning shallow copy if the argument is dictionary it is also possible to use sequence argumentproviding that each item in the sequence is itself sequence of two objectsthe first of which is used as key and the second of which is used as value alternativelyfor dictionaries where the keys are valid python identifierskeyword arguments can be usedwith the key as the keyword and the value as the key' value dictionaries can also be created using braces--empty braces{}create an empty dictionarynonempty braces must contain one or more commaseparated itemseach of which consists of keya literal colonand value another way of creating dictionaries is to use dictionary comprehension-- topic we will cover later in this subsection here are some examples to illustrate the various syntaxes--they all produce the same dictionaryshallow and deep copying keyword arguments dictionary comprehensions dict({"id" "name""washer""size" } dict(id= name="washer"size= dict([("id" )("name""washer")("size" )] dict(zip(("id""name""size")( "washer" )) {"id" "name""washer""size" dictionary is created using dictionary literal dictionary is created using keyword arguments dictionaries and are created from sequencesand dictionary is created from dictionary literal the built-in zip(function that is used to create dictionary returns list of tuplesthe first of which has the first items of each of the zip(function' iterable argumentsthe second of which has the second itemsand so on the keyword argument syntax (used to create dictionary is usually the most compact and convenientproviding the keys are valid identifiers figure illustrates the dictionary created by the following code snippetd {"root" "blue"[ " " ] "venus"- none"mars""rover"( ) dictionary keys are uniqueso if we add key-value item whose key is the same as an existing keythe effect is to replace that key' value with new value brackets are used to access individual values--for exampled["root"returns [ returns the string "venus"and [ causes keyerror exception to be raisedgiven the dictionary shown in figure brackets can also be used to add and delete dictionary items to add an item we use the operatorfor exampled[" " and to delete an item we use the del statement--for exampledel ["mars"will delete the item whose key is "marsfrom the dictionaryor raise keyerror exception if no item has that zip(