Here is a simple code that performs operations on lists:
>>> a = [0] * 5 >>> a [0, 0, 0, 0, 0] >>> a[0] = 5 >>> a [5, 0, 0, 0
Try this,
a = map([].append, {} for i in xrange(3))