Att Dictionary Update
# Python2.x Python Dictionary update() Method
[ Python Dictionary](#)
* * *
## Description
The Python Dictionary update() function updates the dictionary dict with the key/value pairs from dict2.
## Syntax
The syntax for the update() method is:
dict.update(dict2)
## Parameters
* dict2 -- The dictionary to be added to the specified dictionary dict.
## Return Value
This method does not return any value.
## Example
The following example demonstrates the usage of the update() function:
## Example
#!/usr/bin/python
tinydict ={'Name': 'Zara','Age': 7}
tinydict2 ={'Sex': 'female'}
tinydict.update(tinydict2)
print("Value : %s" % tinydict)
The output of the above example is:
Value : {'Age': 7, 'Name': 'Zara', 'Sex': 'female'}
[ Python Dictionary](#)
YouTip