python - Replacing value in dictionary -
 I'm not sure how to change the value of a dictionary with the second value I   I need     I think you are more confused, depending on your requirement, just what you want    dict.fromkeys (my_dict, my_dict, same ku Rebuild the entire dictionary with the capital structure, but with the value  b  Value should be replaced with the value of  a  and the value of  c  should be replaced by the value of the code   (which is  a  is the value of). For d_values for d_keys in  :   
 my_dict = {"a": 1, "b": "a", "My_dict.keys ()": if d_values in d_values: My_dict [d_keys] = d_values    my_dict  to become  {a: 1, b: 1, c: 1} , but my code gives me  {a: a ....}  with somewhere line    
> gt; & gt; therefore values Instead of changing, '' one ': 1,' C ': 1,' B ': 1}    my_dict ['a']    
 
  
Comments
Post a Comment