Update a dictionary : Dictionary update : Dictionary PYTHON examples


PYTHON examples » Dictionary » Dictionary update »

 

Update a dictionary


Update a dictionary


d2 = {'spam': 2'ham': 1'eggs': 3}    # make a dictionary

print d2                                       # order is scrambled

d3 = {'toast':4'muffin':5}

d2.update(d3)

print d2

           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Dictionary
» Dictionary update