def make_dict_copy(from_dict):
 copy_from_dict = {}
 for (key, value) in from_dict.items():
  if (type(value).__name__ == 'dict'):
   copy_from_dict[key] = make_dict_copy(value)
  elif isinstance(value, list):
   copy_from_dict[key] = make_list_copy(value)
  else:
   copy_from_dict[key] = value
 return copy_from_dict

def make_dict_copy ( from_dict ) : copy_from_dict = { } for ( key , value ) in from_dict . items ( ) : if ( type ( value ) . __name__ == 'dict' ) : copy_from_dict [ key ] = make_dict_copy ( value ) elif isinstance ( value , list ) : copy_from_dict [ key ] = make_list_copy ( value ) else : copy_from_dict [ key ] = value return copy_from_dict
makes a copy of input dictionary from_dict such that all values that are dictionaries result in creation of a new dictionary .