how to copy dict in function without return pyrthon code example Example: copy a dict in python dict2 = dict1.copy()