Actually, I don't know how to explain this question in a proper title. Any edition is welcome.
Let's just see the example.
# python 2.7.x
import collections
d = collections.defaultdict(int)
d['a'] = 2
d['b'] = 1
res = [d]* 2
res[0]['a'] -= 1
print res[1]
# => defaultdict(<type 'int'>, {'a': 1, 'b': 1})
I was wondering why it affects the res[1]
?