0

I try to manipulate a dictionary in python but it effects all the rest instances

a={'a':1,'b':2}
b , c = a, a
b['a']=5

print "A:" ,a 
print "B:" ,b 
print "C:" ,c

the output:

 A: {'a': 5, 'b': 2}
 B: {'a': 5, 'b': 2}
 C: {'a': 5, 'b': 2}

how can I change only 'b' ??

0 Answers0