Python‎ > ‎dict‎ > ‎

dict.copy()

http://www.adilwaseem.com/

Introduction
Return with the copy of the dictionary.

Syntax
dict.copy()

Parameters
None

Examples
The method equivalent to:
>>> dict={'Adil':49,'John':33}
>>> dict.copy()
{'John': 33, 'Adil': 49}

Returns with the copy of the dictionary.
 >>> x=dict({'VA':3.1, 'DC':2,'NY':5.1, 'CA':4.4})
>>> x.copy()
{'DC': 2, 'VA': 3.1, 'NY': 5.1, 'CA': 4.4}
>>> 

Comments