How to copy dictionary in Python

1 Answer

0 votes
language = {'python': 13, 'php': 50, 'java': 6}

copy_language = language.copy()

print(copy_language)


'''
run:

{'python': 13, 'java': 6, 'php': 50}
  
'''

 



answered Aug 29, 2018 by avibootz
...