copy() method for dictionary

All dictionary methods

copy(), takes no argument.

Returns : copied dictionary.
my_dict={'a':'Alex','b':'Ronald','c':'Ron'}
my_dict2=my_dict.copy()
print(my_dict2)
Output is here
{'a': 'Alex', 'b': 'Ronald', 'c': 'Ron'}
All dictionary methods
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer