new copy dict python code example Example 1: copy a dictionary python new_dict = old_dict.copy() Example 2: copy a dict in python dict2 = dict1.copy()